Appearance
Options
php
final readonly class PPTXenigma\OptionsThe settings of an extraction. The object is immutable: use the named arguments to change a setting.
new Options(sign: '§', duplicates: Duplicates::KeepLast, htmlTags: ['bold' => 'strong']);
Source: src/Options.php
Constants
| Name | Value | Description |
|---|---|---|
DEFAULT_HTML_TAGS | ['bold' => 'b', 'italic' => 'i', 'underline' => 'u', 'strike' => 's', 'superscript' => 'sup', 'subscript' => 'sub'] | The HTML tag of each style. |
DEFAULT_SIGN | '¤' | The sign that opens and closes the voice-overs when no other one is set. |
Methods
__construct()
php
public function __construct(string $sign = self::DEFAULT_SIGN, Duplicates $duplicates = Duplicates::Error, array $htmlTags = [], array $linkSchemes = ['http', 'https', 'mailto', 'tel'], string $endSign = null)| Parameter | Description |
|---|---|
$sign | the sign that opens a voice-over, "¤" by default; with null, the sign is the text of the first notes, which are then not searched |
$duplicates | what to do when a speaker uses the same reference twice |
$htmlTags | the HTML tag of a style, by style: bold, italic, underline, strike, superscript and subscript |
$linkSchemes | the schemes of the links that are kept, in lowercase; the other links are written as plain text |
$endSign | the sign that closes a voice-over; without it, the sign that opens it closes it too |
Throws InvalidArgumentException when a setting is not valid
htmlTag()
php
public function htmlTag(string $style): stringThe HTML tag of a style: bold, italic, underline, strike, superscript or subscript.