WordPressOption
class WordPressOption implements ArrayAccess
Properties
protected string | $tableName | Name of table. | |
protected array | $fields | Table description fields. | |
protected Plugin | $plugin | An instance of Plugin class or null. | |
protected array|null|object | $row | Option record. |
Methods
Create a new WordPressOption.
Get the string representation (json) of the options.
Return the flat array of the options.
Return a branch/single option by path.
Set (or remove) a branch/single option by path.
No description
No description
No description
No description
Delete a branch/single option by path.
Update a branch of options.
Execute a delta from the current version of the options and the previous version stored in the database.
Load the default value from config/options.php
and replace the current.
Details
at line 57
__construct($plugin = null)
Create a new WordPressOption.
at line 92
string
__toString()
Get the string representation (json) of the options.
at line 102
array
toArray()
Return the flat array of the options.
at line 119
array|mixed|string
get(string $path, string $default = "")
Return a branch/single option by path.
at line 149
array|null
set(string $path, mixed $value = null)
Set (or remove) a branch/single option by path.
at line 178
offsetSet($offset, $value)
at line 183
offsetExists($offset)
at line 188
offsetUnset($offset)
at line 193
offsetGet($offset)
at line 205
array
delete(string $path = '')
Delete a branch/single option by path.
at line 244
false|int
update(array $options = [])
Update a branch of options.
at line 270
false|int
delta()
Execute a delta from the current version of the options and the previous version stored in the database.
at line 298
false|int
reset()
Load the default value from config/options.php
and replace the current.