Difference between revisions of "JRegistry"
From Joomla! Documentation
m (→User contributed notes: moving preparation) |
m (preparing for archive only) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
=={{JVer|11.1}} JRegistry== | =={{JVer|11.1}} JRegistry== | ||
===Description=== | ===Description=== | ||
− | + | ||
− | + | ||
− | |||
− | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
Line 14: | Line 12: | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::__clone | + | |[[API17:JRegistry::__clone|__clone]] |
|Magic function to clone the registry object. | |Magic function to clone the registry object. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::__construct | + | |[[API17:JRegistry::__construct|__construct]] |
|Constructor. | |Constructor. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::__toString | + | |[[API17:JRegistry::__toString|__toString]] |
|Magic function to render this object as a string using default args of toString method. | |Magic function to render this object as a string using default args of toString method. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::def | + | |[[API17:JRegistry::def|def]] |
|Sets a default value if not alreay assigned. | |Sets a default value if not alreay assigned. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::exists | + | |[[API17:JRegistry::exists|exists]] |
|Check if a registry path exists. | |Check if a registry path exists. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::get | + | |[[API17:JRegistry::get|get]] |
|Get a registry value. | |Get a registry value. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::getNameSpaces | + | |[[API17:JRegistry::getNameSpaces|getNameSpaces]] |
|Get the list of namespaces. | |Get the list of namespaces. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::getValue | + | |[[API17:JRegistry::getValue|getValue]] |
|Get a registry value. | |Get a registry value. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::loadArray | + | |[[API17:JRegistry::loadArray|loadArray]] |
|Load a associative array of values into the default namespace. | |Load a associative array of values into the default namespace. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::loadFile | + | |[[API17:JRegistry::loadFile|loadFile]] |
|Load the contents of a file into the registry. | |Load the contents of a file into the registry. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::loadINI | + | |[[API17:JRegistry::loadINI|loadINI]] |
|Load an INI string into the registry into the given namespace [or default if a namespace is not given]. | |Load an INI string into the registry into the given namespace [or default if a namespace is not given]. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::loadJSON | + | |[[API17:JRegistry::loadJSON|loadJSON]] |
|Load an JSON string into the registry into the given namespace [or default if a namespace is not given]. | |Load an JSON string into the registry into the given namespace [or default if a namespace is not given]. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::loadObject | + | |[[API17:JRegistry::loadObject|loadObject]] |
|Load the public variables of the object into the default namespace. | |Load the public variables of the object into the default namespace. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::loadSetupFile | + | |[[API17:JRegistry::loadSetupFile|loadSetupFile]] |
|This method is added as an interim solution for API references in Joomla! 1.6 to the object where in 1.5 a object existed. | |This method is added as an interim solution for API references in Joomla! 1.6 to the object where in 1.5 a object existed. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::loadString | + | |[[API17:JRegistry::loadString|loadString]] |
|Load a string into the registry. | |Load a string into the registry. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::loadXML | + | |[[API17:JRegistry::loadXML|loadXML]] |
|Load an XML string into the registry into the given namespace [or default if a namespace is not given]. | |Load an XML string into the registry into the given namespace [or default if a namespace is not given]. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::makeNameSpace | + | |[[API17:JRegistry::makeNameSpace|makeNameSpace]] |
|Create a namespace. | |Create a namespace. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::merge | + | |[[API17:JRegistry::merge|merge]] |
|Merge a object into this one. | |Merge a object into this one. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::set | + | |[[API17:JRegistry::set|set]] |
|Set a registry value. | |Set a registry value. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::setValue | + | |[[API17:JRegistry::setValue|setValue]] |
|Set a registry value. | |Set a registry value. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::toArray | + | |[[API17:JRegistry::toArray|toArray]] |
|Transforms a namespace to an array. | |Transforms a namespace to an array. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::toObject | + | |[[API17:JRegistry::toObject|toObject]] |
|Transforms a namespace to an object. | |Transforms a namespace to an object. | ||
|- | |- | ||
|public | |public | ||
− | |[[JRegistry::toString | + | |[[API17:JRegistry::toString|toString]] |
|Get a namespace in a given string format. | |Get a namespace in a given string format. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JRegistry::getInstance | + | |[[API17:JRegistry::getInstance|getInstance]] |
|Returns a reference to a global object, only creating it if it doesn't already exist. | |Returns a reference to a global object, only creating it if it doesn't already exist. | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JRegistry::asArray | + | |[[API17:JRegistry::asArray|asArray]] |
|Method to recursively convert an object of data to an array. | |Method to recursively convert an object of data to an array. | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JRegistry::bindData | + | |[[API17:JRegistry::bindData|bindData]] |
|Method to recursively bind data to a parent object. | |Method to recursively bind data to a parent object. | ||
|- | |- | ||
Line 120: | Line 118: | ||
* '''Defined in''' libraries/joomla/registry/registry.php | * '''Defined in''' libraries/joomla/registry/registry.php | ||
* '''Extended by''' | * '''Extended by''' | ||
− | ** [[JParameter | + | ** [[API17:JParameter|JParameter]] |
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.registry.registry' );</source> | <source lang="php">jimport( 'joomla.registry.registry' );</source> | ||
===See also=== | ===See also=== | ||
* {{JVer|11.1}} '''JRegistry source code''' on [[jplatform:registry/registry.php|BitBucket]] | * {{JVer|11.1}} '''JRegistry source code''' on [[jplatform:registry/registry.php|BitBucket]] | ||
− | * {{JVer|11.1}} Subpackage [[Subpackage Registry | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage Registry|Registry]] |
− | * [[JRegistry|Other versions of JRegistry]] | + | * [[API17:JRegistry|Other versions of JRegistry]] |
− | + | ||
− | + | ||
− | |||
− | |||
===User contributed notes=== | ===User contributed notes=== | ||
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JRegistry | category=JRegistry | ||
− | + | namespace=CodeExample | |
category=ClassExample | category=ClassExample | ||
include=* | include=* |
Latest revision as of 22:33, 24 March 2017
The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
JRegistry[edit]
Description[edit]
Methods[edit]
Visibility | Method name | Description |
---|---|---|
public | __clone | Magic function to clone the registry object. |
public | __construct | Constructor. |
public | __toString | Magic function to render this object as a string using default args of toString method. |
public | def | Sets a default value if not alreay assigned. |
public | exists | Check if a registry path exists. |
public | get | Get a registry value. |
public | getNameSpaces | Get the list of namespaces. |
public | getValue | Get a registry value. |
public | loadArray | Load a associative array of values into the default namespace. |
public | loadFile | Load the contents of a file into the registry. |
public | loadINI | Load an INI string into the registry into the given namespace [or default if a namespace is not given]. |
public | loadJSON | Load an JSON string into the registry into the given namespace [or default if a namespace is not given]. |
public | loadObject | Load the public variables of the object into the default namespace. |
public | loadSetupFile | This method is added as an interim solution for API references in Joomla! 1.6 to the object where in 1.5 a object existed. |
public | loadString | Load a string into the registry. |
public | loadXML | Load an XML string into the registry into the given namespace [or default if a namespace is not given]. |
public | makeNameSpace | Create a namespace. |
public | merge | Merge a object into this one. |
public | set | Set a registry value. |
public | setValue | Set a registry value. |
public | toArray | Transforms a namespace to an array. |
public | toObject | Transforms a namespace to an object. |
public | toString | Get a namespace in a given string format. |
public static | getInstance | Returns a reference to a global object, only creating it if it doesn't already exist. |
protected | asArray | Method to recursively convert an object of data to an array. |
protected | bindData | Method to recursively bind data to a parent object. |
- Defined in libraries/joomla/registry/registry.php
- Extended by
Importing[edit]
jimport( 'joomla.registry.registry' );
See also[edit]
- JRegistry source code on BitBucket
- Subpackage Registry
- Other versions of JRegistry
User contributed notes[edit]
Code Examples[edit]