DocumentOptions
MMO\core\documents · 1 symbol · generated 30 Sep 2026
DocumentOptions
DocumentOptions.php:25A document's options as named arguments, for its constructor: new HtmlDocument(null, new DocumentOptions(...)) stands for new HtmlDocument(null, ['raw' => true, ...]), and a misspelled option is an error instead of being ignored.
- Namespace
MMO\core\documents- Implements
- iOptions
Index
Properties5
charset
readonly- Type
- null | PrintOptions
printer
readonlyraw
readonlyvars
readonlyMethods2
toArray()
DocumentOptions.php:48| returns | array | mixed> the options that are set, the printer's among them: a document keeps them in one list |
__construct($raw, $charset, $printer, $vars, $print)
DocumentOptions.php:36| $raw = null | null | bool | the document as plain as its format allows: an HtmlDocument without the CSS and JS it adds (e.g. an e-mail), a JsonDocument without its meta/links/logs envelope. Document::setRaw() |
| $charset = null | null | string | XmlDocument, HtmlDocument: the charset it declares (default 'utf-8'). |
| $printer = null | null | object | the invokable printer of its values, e.g. HtmlPrinter::Shared() (default: the one of its format). Document::setPrinter() |
| $vars = null | null | array | |
| $print = null | null | PrintOptions | the options of every value it renders. |