tWithOptions
MMO\core\classes · 1 symbole · générée le 27 Oct 2026
tWithOptions
tWithOptions.php:13Gives a class a simple key/value "options" bag (e.g. request options: headers, timeouts, ...), backed by a single protected $opts array.
- Espace de noms
MMO\core\classes
Index
| opts | ||
| addOptions($opts, $appendList) | Merge $opts into the existing options (through merge), rather than replacing them wholesale like setOptions. | |
| clearOptions() | Empty the options bag. | |
| getOption($key, $default) | ||
| getOptions() | ||
| setOption($key, $value) | Set (or, with a null $value, remove) a single option. | |
| setOptions($opts) | Replace the whole options bag. |
Propriétés1
opts
- Type
- array
Méthodes6
addOptions($opts, $appendList)
tWithOptions.php:65Merge $opts into the existing options (through merge), rather than replacing them wholesale like setOptions.
| $opts | array | the options to merge in |
| $appendList = false | bool | if true, a list-valued option is appended to (rather than replaced by) the corresponding list in $opts -- see \MMO\core\arrays\merge for the exact semantics |
| retourne | void |
clearOptions()
tWithOptions.php:39Empty the options bag.
| retourne | void |
getOption($key, $default)
tWithOptions.php:49getOptions()
tWithOptions.php:20| retourne | array | every option currently set |
setOption($key, $value)
tWithOptions.php:77Set (or, with a null $value, remove) a single option.
| $key | string | |
| $value | mixed | if null, the option is unset entirely rather than being set to null |
| retourne | void |
setOptions($opts)
tWithOptions.php:30Replace the whole options bag.