Appearance
VoiceOvers
php
final readonly class PPTXenigma\VoiceOvers implements Countable, IteratorAggregateThe 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)| Parameter | Description |
|---|---|
$sign | the sign that delimited the voice-overs |
count()
php
public function count(): intforSpeaker()
php
public function forSpeaker(string $speaker): selfThe voice-overs of one speaker only.
Throws InvalidArgumentException when the speaker has no voice-over
getIterator()
php
public function getIterator(): ArrayIteratorReturns ArrayIterator<int, VoiceOver>
script()
php
public function script(string $speaker, ScriptOptions $scriptOptions = new ScriptOptions()): ScriptThe 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()): arrayThe script of each speaker.
Returns array<string, Script> the scripts, by speaker
speakers()
php
public function speakers(): arrayReturns list<string> the speakers, in the order of the voice-overs
toArray()
php
public function toArray(Format $format = Format::Html): arrayReturns array<string, array<string, string>> the content of each voice-over, by speaker then by reference
toHtml()
php
public function toHtml(): stringA fragment of HTML: a heading for each speaker and each reference, then the voice-over.
toJson()
php
public function toJson(Format $format = Format::Html): stringtoText()
php
public function toText(): stringA document in plain text: a title for each speaker, then each reference between brackets and its text.