Skip to content

VoiceOvers ​

php
final readonly class PPTXenigma\VoiceOvers implements Countable, IteratorAggregate

The voice-overs of a presentation, sorted by speaker, then in the order of the slides.

Source: src/VoiceOvers.php

Methods ​

__construct() ​

php
public function __construct(string $sign, array $voiceOvers)
ParameterDescription
$signthe sign that delimited the voice-overs

count() ​

php
public function count(): int

forSpeaker() ​

php
public function forSpeaker(string $speaker): self

The voice-overs of one speaker only.

Throws InvalidArgumentException when the speaker has no voice-over

getIterator() ​

php
public function getIterator(): ArrayIterator

Returns ArrayIterator<int, VoiceOver>

script() ​

php
public function script(string $speaker, ScriptOptions $scriptOptions = new ScriptOptions()): Script

The script of one speaker, to send to a voice actor.

Throws InvalidArgumentException when the speaker has no voice-over

scripts() ​

php
public function scripts(ScriptOptions $scriptOptions = new ScriptOptions()): array

The script of each speaker.

Returns array<string, Script> the scripts, by speaker

speakers() ​

php
public function speakers(): array

Returns list<string> the speakers, in the order of the voice-overs

toArray() ​

php
public function toArray(Format $format = Format::Html): array

Returns array<string, array<string, string>> the content of each voice-over, by speaker then by reference

toHtml() ​

php
public function toHtml(): string

A fragment of HTML: a heading for each speaker and each reference, then the voice-over.

toJson() ​

php
public function toJson(Format $format = Format::Html): string

toText() ​

php
public function toText(): string

A document in plain text: a title for each speaker, then each reference between brackets and its text.

Documentation of 1.0.0 , built from 5dd2e99 on 1.0.0 by pipeline #37507528046 on 2026-10-06.