Support Joomla!

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2008 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.

 Class JRegistry

Description

JRegistry class

  • since: 1.5

Located in /joomla/registry/registry.php (line 28)

Class JObject   (Subpackage Base)

Class JRegistry   (Subpackage Registry)
Direct descendents
Class Description
ClassJParameter Parameter handler
Variable Summary
Method Summary
Static method static object The &getInstance (string $id, [string $namespace = 'default'])
Constructor void __construct ([string $namespace = 'default'])
Method array getNameSpaces ()
Method mixed getValue (string $regpath, [mixed $default = null])
Method boolean loadArray (array $array, [ $namespace = null], string $namepsace)
Method boolean loadFile (string $file, [string $format = 'INI'], [string $namespace = null])
Method boolean loadINI (string $data, [string $namespace = null])
Method boolean loadObject ( &$object, [string $namespace = null], object $object)
Method boolean loadXML (string $data, [string $namespace = null])
Method boolean makeNameSpace (string $namespace)
Method boolean merge ( &$source, object $source)
Method mixed setValue (string $regpath, mixed $value)
Method array toArray ([string $namespace = null])
Method object An toObject ([string $namespace = null])
Method string toString ([string $format = 'INI'], [string $namespace = null], [mixed $params = null])
Method void __clone ()
Variables
string $_defaultNameSpace = null (line 34)

Default NameSpace

array $_registry = array () (line 41)

Registry Object

  • actually an array of namespace objects

Inherited Variables

Inherited from JObject

Variable JObject::$_errors
Methods
Constructor __construct (line 51)

Constructor

  • since: 1.5
  • access: protected
void __construct ([string $namespace = 'default'])
  • string $namespace: Default registry namespace

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.

Redefined in descendants as:
getInstance (line 70)

Returns a reference to a global JRegistry object, only creating it if it doesn't already exist.

This method must be invoked as:

$registry =& JRegistry::getInstance($id[, $namespace]);

  • return: JRegistry object.
  • since: 1.5
object The &getInstance (string $id, [string $namespace = 'default'])
  • string $id: An ID for the registry instance
  • string $namespace: The default namespace for the registry object [optional]
getNameSpaces (line 106)

Get the list of namespaces

  • return: List of namespaces
  • since: 1.5
  • access: public
array getNameSpaces ()
getValue (line 120)

Get a registry value

  • return: Value of entry or null
  • since: 1.5
  • access: public
mixed getValue (string $regpath, [mixed $default = null])
  • string $regpath: Registry path (e.g. joomla.content.showauthor)
  • mixed $default: Optional default value
loadArray (line 214)

Load a associative array of values into the default namespace

  • return: True on success
  • since: 1.5
  • access: public
boolean loadArray (array $array, [ $namespace = null], string $namepsace)
  • array $array: Associative array of value to load
  • string $namepsace: The name of the namespace
  • $namespace
loadFile (line 283)

Load the contents of a file into the registry

  • return: True on success
  • since: 1.5
  • access: public
boolean loadFile (string $file, [string $format = 'INI'], [string $namespace = null])
  • string $file: Path to file to load
  • string $format: Format of the file [optional: defaults to INI]
  • string $namespace: Namespace to load the INI string into [optional]
loadINI (line 370)

Load an INI string into the registry into the given namespace [or default if a namespace is not given]

  • return: True on success
  • since: 1.5
  • access: public
boolean loadINI (string $data, [string $namespace = null])
  • string $data: INI formatted string to load into the registry
  • string $namespace: Namespace to load the INI string into [optional]
loadObject (line 244)

Load the public variables of the object into the default namespace.

  • return: True on success
  • since: 1.5
  • access: public
boolean loadObject ( &$object, [string $namespace = null], object $object)
  • object $object: The object holding the public vars to load
  • string $namespace: Namespace to load the INI string into [optional]
  • &$object
loadXML (line 330)

Load an XML string into the registry into the given namespace [or default if a namespace is not given]

  • return: True on success
  • since: 1.5
  • access: public
boolean loadXML (string $data, [string $namespace = null])
  • string $data: XML formatted string to load into the registry
  • string $namespace: Namespace to load the XML string into [optional]
makeNameSpace (line 93)

Create a namespace

  • return: True on success
  • since: 1.5
  • access: public
boolean makeNameSpace (string $namespace)
  • string $namespace: Name of the namespace to create
merge (line 409)

Merge a JRegistry object into this one

  • return: True on success
  • since: 1.5
  • access: public
boolean merge ( &$source, object $source)
  • object $source: Source JRegistry object ot merge
  • &$source
setValue (line 163)

Set a registry value

  • return: Value of old value or boolean false if operation failed
  • since: 1.5
  • access: public
mixed setValue (string $regpath, mixed $value)
  • string $regpath: Registry Path (e.g. joomla.content.showauthor)
  • mixed $value: Value of entry
toArray (line 469)

Transforms a namespace to an array

  • return: An associative array holding the namespace data
  • since: 1.5
  • access: public
array toArray ([string $namespace = null])
  • string $namespace: Namespace to return [optional: null returns the default namespace]
toObject (line 495)

Transforms a namespace to an object

  • return: an object holding the namespace data
  • since: 1.5
  • access: public
object An toObject ([string $namespace = null])
  • string $namespace: Namespace to return [optional: null returns the default namespace]
toString (line 445)

Get a namespace in a given string format

  • return: Namespace in string format
  • since: 1.5
  • access: public
string toString ([string $format = 'INI'], [string $namespace = null], [mixed $params = null])
  • string $format: Format to return the string in
  • string $namespace: Namespace to return [optional: null returns the default namespace]
  • mixed $params: Parameters used by the formatter, see formatters for more info

Redefinition of:
JObject::toString()
Object-to-string conversion.
__clone (line 508)
void __clone ()

Inherited Methods

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::getPublicProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::toString()

Documentation generated on Mon, 22 Sep 2008 12:12:39 +0100 by phpDocumentor 1.3.1