Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct ($data=null) | |
__clone () | |
__toString () | |
count () | |
jsonSerialize () | |
def ($key, $default='') | |
exists ($path) | |
get ($path, $default=null) | |
getIterator () | |
loadArray (array $array, $flattened=false, $separator=null) | |
loadObject ($object) | |
loadFile ($file, $format='JSON', array $options=[]) | |
loadString ($data, $format='JSON', array $options=[]) | |
merge (Registry $source, $recursive=false) | |
extract ($path) | |
offsetExists ($offset) | |
offsetGet ($offset) | |
offsetSet ($offset, $value) | |
offsetUnset ($offset) | |
set ($path, $value, $separator=null) | |
append ($path, $value) | |
remove ($path) | |
toArray () | |
toObject () | |
toString ($format='JSON', array $options=[]) | |
flatten ($separator=null) | |
Champs de données | |
$separator = '.' | |
Fonctions membres protégées | |
bindData ($parent, $data, $recursive=true, $allowNull=true) | |
asArray ($data) | |
toFlatten ($separator=null, $data=null, array &$array=[], $prefix='') | |
Attributs protégés | |
$data | |
$initialized = false | |
Registry class
__construct | ( | $data = null | ) |
Constructor
mixed | $data | The data to bind to the new Registry object. |
Références Registry\$data, Registry\bindData(), elseif, Registry\loadString(), et Registry\merge().
__clone | ( | ) |
Magic function to clone the registry object.
__toString | ( | ) |
Magic function to render this object as a string using default args of toString method.
Références Registry\toString().
append | ( | $path, | |
$value | |||
) |
|
protected |
Method to recursively convert an object of data to an array.
object | $data | An object of data to return as an array. |
Références $data.
Method to recursively bind data to a parent object.
object | $parent | The parent object on which to attach the data values. |
mixed | $data | An array or object of data to bind to the parent object. |
boolean | $recursive | True to support recursive bindData. |
boolean | $allowNull | True to allow null values. |
Référencé par Registry\__construct(), Registry\loadArray(), Registry\loadObject(), et Registry\merge().
count | ( | ) |
Count elements of the data object
Référencé par Registry\set().
def | ( | $key, | |
$default = '' |
|||
) |
exists | ( | $path | ) |
Check if a registry path exists.
string | $path | Registry path (e.g. joomla.content.showauthor) |
Références Registry\$data, $n, et $path.
Référencé par Registry\offsetExists().
extract | ( | $path | ) |
Method to extract a sub-registry from path
string | $path | Registry path (e.g. joomla.content.showauthor) |
Références Registry\$data, et $path.
flatten | ( | $separator = null | ) |
Dump to one dimension array.
string | $separator | The key separator. |
Références $separator.
get | ( | $path, | |
$default = null |
|||
) |
getIterator | ( | ) |
Gets this object represented as an ArrayIterator.
This allows the data properties to be accessed via a foreach statement.
jsonSerialize | ( | ) |
Implementation for the JsonSerializable interface. Allows us to pass Registry objects to json_encode.
Références Registry\$data.
Load an associative array of values into the default namespace
array | $array | Associative array of value to load |
boolean | $flattened | Load from a one-dimensional array |
string | $separator | The key separator |
Références Registry\$separator, $this, et Registry\bindData().
loadFile | ( | $file, | |
$format = 'JSON' , |
|||
array | $options = [] |
||
) |
Load the contents of a file into the registry
string | $file | Path to file to load |
string | $format | Format of the file [optional: defaults to JSON] |
array | $options | Options used by the formatter |
Références Registry\$data, $format, $options, et Registry\loadString().
loadObject | ( | $object | ) |
Load the public variables of the object into the default namespace.
object | $object | The object holding the publics to load |
Références $this, et Registry\bindData().
Référencé par Registry\loadString().
loadString | ( | $data, | |
$format = 'JSON' , |
|||
array | $options = [] |
||
) |
Load a string into the registry
string | $data | String to load into the registry |
string | $format | Format of the string |
array | $options | Options used by the formatter |
Références Registry\$data, $format, $options, $this, Factory\getFormat(), et Registry\loadObject().
Référencé par Registry\__construct(), et Registry\loadFile().
Merge a Registry object into this one
Registry | $source | Source Registry object to merge. |
boolean | $recursive | True to support recursive merge the children values. |
Références $this, Registry\bindData(), et Registry\toArray().
Référencé par Registry\__construct().
offsetExists | ( | $offset | ) |
Checks whether an offset exists in the iterator.
mixed | $offset | The array offset. |
Références Joomla\Database\Query\$offset, et Registry\exists().
offsetGet | ( | $offset | ) |
Gets an offset in the iterator.
mixed | $offset | The array offset. |
Références Joomla\Database\Query\$offset.
offsetSet | ( | $offset, | |
$value | |||
) |
Sets an offset in the iterator.
mixed | $offset | The array offset. |
mixed | $value | The array value. |
Références Joomla\Database\Query\$offset, et $value.
offsetUnset | ( | $offset | ) |
Unsets an offset in the iterator.
mixed | $offset | The array offset. |
Références Joomla\Database\Query\$offset.
remove | ( | $path | ) |
set | ( | $path, | |
$value, | |||
$separator = null |
|||
) |
Set a registry value.
string | $path | Registry Path (e.g. joomla.content.showauthor) |
mixed | $value | Value of entry |
string | $separator | The key separator |
Références Registry\$data, $i, $n, $path, Registry\$separator, et Registry\count().
toArray | ( | ) |
Transforms a namespace to an array
Référencé par Registry\merge().
Method to recursively convert data to one dimension array.
string | $separator | The key separator. |
array | object | $data | Data source of this scope. |
array | $array | The result array, it is passed by reference. |
string | $prefix | Last level key prefix. |
Références $data, $key, $prefix, et $separator.
toObject | ( | ) |
Transforms a namespace to an object
Références $data.
toString | ( | $format = 'JSON' , |
|
array | $options = [] |
||
) |
Get a namespace in a given string format
string | $format | Format to return the string in |
array | $options | Parameters used by the formatter, see formatters for more info |
Références $format, et $options.
Référencé par Registry\__toString().
|
protected |
|
protected |
$separator = '.' |
Référencé par Registry\loadArray(), et Registry\set().