API17:JRegistry
From Joomla! Documentation
(Difference between revisions)
(Layout updates) |
m (→User contributed notes: bad link repair) |
||
| (One intermediate revision by one user not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| + | =={{JVer|11.1}} JRegistry== | ||
| + | ===Description=== | ||
| + | {{Description:JRegistry}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[Description:JRegistry|Edit Descripton]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[Description:JRegistry|Edit Descripton]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
| + | !Visibility | ||
!Method name | !Method name | ||
!Description | !Description | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::__clone/11.1|__clone]] | |[[JRegistry::__clone/11.1|__clone]] | ||
|Magic function to clone the registry object. | |Magic function to clone the registry object. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::__construct/11.1|__construct]] | |[[JRegistry::__construct/11.1|__construct]] | ||
|Constructor. | |Constructor. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::__toString/11.1|__toString]] | |[[JRegistry::__toString/11.1|__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 | ||
|[[JRegistry::def/11.1|def]] | |[[JRegistry::def/11.1|def]] | ||
|Sets a default value if not alreay assigned. | |Sets a default value if not alreay assigned. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::exists/11.1|exists]] | |[[JRegistry::exists/11.1|exists]] | ||
|Check if a registry path exists. | |Check if a registry path exists. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::get/11.1|get]] | |[[JRegistry::get/11.1|get]] | ||
|Get a registry value. | |Get a registry value. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::getNameSpaces/11.1|getNameSpaces]] | |[[JRegistry::getNameSpaces/11.1|getNameSpaces]] | ||
|Get the list of namespaces. | |Get the list of namespaces. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::getValue/11.1|getValue]] | |[[JRegistry::getValue/11.1|getValue]] | ||
|Get a registry value. | |Get a registry value. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::loadArray/11.1|loadArray]] | |[[JRegistry::loadArray/11.1|loadArray]] | ||
|Load a associative array of values into the default namespace. | |Load a associative array of values into the default namespace. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::loadFile/11.1|loadFile]] | |[[JRegistry::loadFile/11.1|loadFile]] | ||
|Load the contents of a file into the registry. | |Load the contents of a file into the registry. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::loadINI/11.1|loadINI]] | |[[JRegistry::loadINI/11.1|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 | ||
|[[JRegistry::loadJSON/11.1|loadJSON]] | |[[JRegistry::loadJSON/11.1|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 | ||
|[[JRegistry::loadObject/11.1|loadObject]] | |[[JRegistry::loadObject/11.1|loadObject]] | ||
|Load the public variables of the object into the default namespace. | |Load the public variables of the object into the default namespace. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::loadSetupFile/11.1|loadSetupFile]] | |[[JRegistry::loadSetupFile/11.1|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 | ||
|[[JRegistry::loadString/11.1|loadString]] | |[[JRegistry::loadString/11.1|loadString]] | ||
|Load a string into the registry. | |Load a string into the registry. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::loadXML/11.1|loadXML]] | |[[JRegistry::loadXML/11.1|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 | ||
|[[JRegistry::makeNameSpace/11.1|makeNameSpace]] | |[[JRegistry::makeNameSpace/11.1|makeNameSpace]] | ||
|Create a namespace. | |Create a namespace. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::merge/11.1|merge]] | |[[JRegistry::merge/11.1|merge]] | ||
|Merge a object into this one. | |Merge a object into this one. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::set/11.1|set]] | |[[JRegistry::set/11.1|set]] | ||
|Set a registry value. | |Set a registry value. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::setValue/11.1|setValue]] | |[[JRegistry::setValue/11.1|setValue]] | ||
|Set a registry value. | |Set a registry value. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::toArray/11.1|toArray]] | |[[JRegistry::toArray/11.1|toArray]] | ||
|Transforms a namespace to an array. | |Transforms a namespace to an array. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::toObject/11.1|toObject]] | |[[JRegistry::toObject/11.1|toObject]] | ||
|Transforms a namespace to an object. | |Transforms a namespace to an object. | ||
|- | |- | ||
| + | |public | ||
|[[JRegistry::toString/11.1|toString]] | |[[JRegistry::toString/11.1|toString]] | ||
|Get a namespace in a given string format. | |Get a namespace in a given string format. | ||
|- | |- | ||
| + | |public static | ||
|[[JRegistry::getInstance/11.1|getInstance]] | |[[JRegistry::getInstance/11.1|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 | ||
|[[JRegistry::asArray/11.1|asArray]] | |[[JRegistry::asArray/11.1|asArray]] | ||
|Method to recursively convert an object of data to an array. | |Method to recursively convert an object of data to an array. | ||
|- | |- | ||
| + | |protected | ||
|[[JRegistry::bindData/11.1|bindData]] | |[[JRegistry::bindData/11.1|bindData]] | ||
|Method to recursively bind data to a parent object. | |Method to recursively bind data to a parent object. | ||
|- | |- | ||
|} | |} | ||
| + | * '''Defined in''' libraries/joomla/registry/registry.php | ||
| + | * '''Extended by''' | ||
| + | ** [[JParameter/11.1|JParameter]] | ||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.registry.registry' );</source> | <source lang="php">jimport( 'joomla.registry.registry' );</source> | ||
===See also=== | ===See also=== | ||
| − | * JRegistry source code | + | * {{JVer|11.1}} '''JRegistry source code''' on [[jplatform:registry/registry.php|BitBucket]] |
| − | * [[JRegistry|Other versions of | + | * {{JVer|11.1}} Subpackage [[Subpackage Registry/11.1|Registry]] |
| + | * [[JRegistry|Other versions of JRegistry]] | ||
{{SeeAlso:JRegistry}} | {{SeeAlso:JRegistry}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[SeeAlso:JRegistry|Edit See Also]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[SeeAlso:JRegistry|Edit See Also]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | === | + | ===User contributed notes=== |
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
<dpl> | <dpl> | ||
| Line 114: | Line 139: | ||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
| + | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
| − | <noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JRegistry]]</noinclude> | + | <noinclude>[[Category:Platform JClasses]][[Category:Platform 11.1]][[Category:JRegistry]]</noinclude> |
Revision as of 14:00, 29 August 2012
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
JRegistry
Description
Description:JRegistry [Edit Descripton]
Methods
| 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
jimport( 'joomla.registry.registry' );
See also
-
JRegistry source code on BitBucket
-
Subpackage Registry
- Other versions of JRegistry
SeeAlso:JRegistry [Edit See Also]
User contributed notes
<CodeExamplesForm />
