Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class JRegistry

Description

JRegistry class

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])
Variables
string $_defaultNameSpace = null (line 34)

Default NameSpace

array $_registry = array () (line 41)

Registry Object

  • actually an array of namespace objects

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 211)

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 277)

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 360)

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 241)

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 322)

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 397)

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 162)

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 453)

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 479)

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 428)

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.

Inherited Methods

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getPublicProperties()
 JObject::set()
 JObject::toString()

Documentation generated on Mon, 05 Mar 2007 21:20:05 +0000 by phpDocumentor 1.3.1