DataTree deprecated
class DataTree implements ArrayAccess, Serializable, IteratorAggregate, Countable, ArrayRepresentation, JsonSerializable (View source)
deprecated
Serializable data tree structure
Constants
| REPLACE |
Content fusion mode. Replace existing data with new content. |
| MERGE |
Content fusion mode.
|
| MERGE_OVERWRITE |
Content fusion mode.
|
| _FUSION_MODES |
Combination of all fusion modes flags |
Methods
No description
Deep copy of the tree
String representation
No description
Equivalent of offsetSet
No description
Indicates if a element key exists
No description
Get a value associated to a key
No description
Set element of a DataTree
No description
No description
No description
No description
Serialize table to JSON
Load element table from JSON
Convert the DataTree to a regular PHP array
Return the element value or the given default value if the setting is not present
No description
Insert an indexed value at the beginning of the setting table
No description
Load a DataTree from a file
No description
Details
at line 63
__construct(array $data = [])
at line 74
__clone()
Deep copy of the tree
at line 86
string
__toString()
String representation
at line 98
The
__get(string $key)
at line 114
__set(string $key, mixed $value)
Equivalent of offsetSet
at line 127
offsetExists($key)
at line 137
has(string $key)
Indicates if a element key exists
at line 150
offsetGet($key)
at line 175
The
get(string $key)
Get a value associated to a key
This method follow the PSR-11 implementation requirements. It is proposed as an interoperability effort. However, the behavior of this method differs from the regular behavior of DataTree.
at line 195
offsetSet($key, $value)
at line 211
setElement(string|integer $key, mixed $value, integer $mode = self::REPLACE)
Set element of a DataTree
at line 274
offsetUnset($key)
at line 283
getIterator()
at line 295
count()
at line 308
jsonSerialize()
at line 316
serialize()
Serialize table to JSON
at line 327
unserialize(string $serialized)
Load element table from JSON
at line 341
array
getArrayCopy()
Convert the DataTree to a regular PHP array
at line 360
mixed
getElement(mixed $key, mixed $defaultValue = null)
Return the element value or the given default value if the setting is not present
at line 398
append($value)
at line 410
New
prepend(mixed $value)
Insert an indexed value at the beginning of the setting table
at line 467
DataTree
loadFile(string $filename, integer $mode = self::REPLACE, string|null $mediaType = null)
Load a DataTree from a file