Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques | |
__construct ($data=null) | |
__clone () | |
__toString () | |
count () | |
jsonSerialize () | |
def ($key, $default='') | |
exists ($path) | |
get ($path, $default=null) | |
getIterator () | |
loadArray ($array, $flattened=false, $separator=null) | |
loadObject ($object) | |
loadFile ($file, $format='JSON', $options=array()) | |
loadString ($data, $format='JSON', $options=array()) | |
merge ($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', $options=array()) | |
flatten ($separator=null) | |
Fonctions membres publiques statiques | |
static | getInstance ($id) |
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 | |
Attributs protégés statiques | |
static | $instances = array() |
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 = '' |
|||
) |
Sets a default value if not already assigned.
string | $key | The name of the parameter. |
mixed | $default | An optional value for the parameter. |
Références $default, $key, et $value.
Référencé par JLinkedinOauth\__construct(), JFacebookOAuth\__construct(), JTwitterOAuth\__construct(), JOpenstreetmapOauth\__construct(), et AssociationsHelper\getSupportedExtension().
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.
extract | ( | $path | ) |
Method to extract a sub-registry from path
string | $path | Registry path (e.g. joomla.content.showauthor) |
Références Registry\$data, $path, et null.
flatten | ( | $separator = null | ) |
Dump to one dimension array.
string | $separator | The key separator. |
Références $separator.
get | ( | $path, | |
$default = null |
|||
) |
Get a registry value.
string | $path | Registry path (e.g. joomla.content.showauthor) |
mixed | $default | Optional default value, returned if the internal value is null. |
Références Registry\$data, $default, $n, $path, et null.
Référencé par KeychainManager\initPassphraseFile().
|
static |
Returns a reference to a global Registry object, only creating it if it doesn't already exist.
This method must be invoked as:
$registry = Registry::getInstance($id);
string | $id | An ID for the registry instance |
Références $id.
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.
Implémente JsonSerializable.
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, et Registry\bindData().
Référencé par FieldsTableField\bind(), FieldsTableGroup\bind(), FieldsControllerGroup\postSaveHook(), et FieldsControllerField\postSaveHook().
loadFile | ( | $file, | |
$format = 'JSON' , |
|||
$options = array() |
|||
) |
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, $file, $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 Registry\bindData().
Référencé par Registry\loadString().
loadString | ( | $data, | |
$format = 'JSON' , |
|||
$options = array() |
|||
) |
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, AbstractRegistryFormat\getInstance(), et Registry\loadObject().
Référencé par Registry\__construct(), FieldsModelField\getItem(), Registry\loadFile(), ContentModelFeatured\populateState(), ContentModelCategory\populateState(), ContactModelCategory\populateState(), et MenusHtmlMenus\visibility().
merge | ( | $source, | |
$recursive = false |
|||
) |
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 Registry\bindData().
Référencé par Registry\__construct().
offsetExists | ( | $offset | ) |
offsetGet | ( | $offset | ) |
Gets an offset in the iterator.
mixed | $offset | The array offset. |
Références $offset.
offsetSet | ( | $offset, | |
$value | |||
) |
offsetUnset | ( | $offset | ) |
Unsets an offset in the iterator.
mixed | $offset | The array offset. |
Références $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().
Référencé par FinderIndexerQuery\__construct(), InstallationModelConfiguration\createConfiguration(), JoomlaupdateModelDefault\download(), InstallerModelDatabase\fixDefaultTextFilters(), UpdateAdapter\getUpdateSiteResponse(), et Update\loadFromXml().
toArray | ( | ) |
Transforms a namespace to an array
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' , |
|
$options = array() |
|||
) |
Get a namespace in a given string format
string | $format | Format to return the string in |
mixed | $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 |
|
staticprotected |
$separator = '.' |
Référencé par Registry\loadArray(), et Registry\set().