Class JRegistry

Description

JRegistry class

Located in /registry/registry.php (line 25)

JObject
   |
   --JRegistry
Direct descendents
Class Description
 class JParameter Parameter handler
Variable Summary
Method Summary
 JRegistry __construct ([$defaultNamespace $namespace = 'default'], [$readOnly $readOnly = false])
 object The &getInstance ($id $id, [$namespace $namespace = 'default'], [$readOnly $readOnly = false])
 mixed getValue ($regpath $regpath, int 1)
 boolean loadArray (&array $array, [&namepsace $namespace = null], [mixed $readOnly = false])
 boolean loadFile ($file $file, [$format $format = 'INI'], [$namespace $namespace = null], [$readOnly $readOnly = false])
 boolean loadINI ($data $data, [$namespace $namespace = null], [$readOnly $readOnly = false])
 boolean loadObject (&object &$object, [&namespace $namespace = null], [&readOnly $readOnly = false])
 boolean loadXML ($data $data, [$namespace $namespace = null], [$readOnly $readOnly = false])
 boolean makeNameSpace ($namespace $namespace, [$readOnly $readOnly = false])
 mixed setValue ($regpath $regpath, mixed $value)
 array toArray ([$namespace $namespace = null])
 object An toObject ([$namespace $namespace = null])
 string toString ([$format $format = 'INI'], [$namespace $namespace = null])
Variables
string $_defaultNameSpace = null (line 32)

Default NameSpace

array $_registry = array () (line 40)

Registry Object

  • actually an array of namespace objects

Methods
Constructor __construct (line 48)

Constructor

JRegistry __construct ([$defaultNamespace $namespace = 'default'], [$readOnly $readOnly = false])
  • $defaultNamespace $namespace: string Default registry namespace
  • $readOnly $readOnly: boolean Is the default namespace read only? [optional: default is false]

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

Redefined in descendants as:
getInstance (line 68)

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][, $readOnly]);

  • return: JRegistry object.
  • since: 1.1
  • static:
object The &getInstance ($id $id, [$namespace $namespace = 'default'], [$readOnly $readOnly = false])
  • $id $id: string An ID for the registry instance
  • $namespace $namespace: string The default namespace for the registry object [optional]
  • $readOnly $readOnly: boolean Is he default namespace read only? [optional: default is false]
getValue (line 106)

Get a registry value

  • return: Value of entry or boolean false
  • access: public
mixed getValue ($regpath $regpath, int 1)
  • int 1: User Id
  • $regpath $regpath: string Registry path (e.g. joomla.content.showauthor)
loadArray (line 192)

Load a associative array of values into the default namespace

  • return: True on success
  • since: 1.1
  • access: public
boolean loadArray (&array $array, [&namepsace $namespace = null], [mixed $readOnly = false])
  • &array $array: Array Associative array of value to load
  • &namepsace $namespace: String The name of the namespace
loadFile (line 263)

Load the contents of a file into the registry

  • return: True on success
  • since: 1.1
  • access: public
boolean loadFile ($file $file, [$format $format = 'INI'], [$namespace $namespace = null], [$readOnly $readOnly = false])
  • $file $file: string Path to file to load
  • $format $format: string Format of the file [optional: defaults to INI]
  • $namespace $namespace: string Namespace to load the INI string into [optional]
  • $readOnly $readOnly: boolean Should the namespace be read only after loading? [optional: default is false]
loadINI (line 345)

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.1
  • access: public
boolean loadINI ($data $data, [$namespace $namespace = null], [$readOnly $readOnly = false])
  • $data $data: string INI formatted string to load into the registry
  • $namespace $namespace: string Namespace to load the INI string into [optional]
  • $readOnly $readOnly: boolean Should the namespace be read only after loading? [optional: default is false]
loadObject (line 225)

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

  • return: True on success
  • since: 1.1
  • access: public
boolean loadObject (&object &$object, [&namespace $namespace = null], [&readOnly $readOnly = false])
  • &object &$object: stdClass The object holding the public vars to load
  • &namespace $namespace: string Namespace to load the INI string into [optional]
  • &readOnly $readOnly: boolean Should the namespace be read only after loading? [optional: default is false]
loadXML (line 306)

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.1
  • access: public
boolean loadXML ($data $data, [$namespace $namespace = null], [$readOnly $readOnly = false])
  • $data $data: string XML formatted string to load into the registry
  • $namespace $namespace: string Namespace to load the INI string into [optional]
  • $readOnly $readOnly: boolean Should the namespace be read only after loading? [optional: default is false]
makeNameSpace (line 92)

Create a namespace

  • return: True on success
  • since: 1.1
  • access: public
boolean makeNameSpace ($namespace $namespace, [$readOnly $readOnly = false])
  • $namespace $namespace: string Name of the namespace to create
  • $readOnly $readOnly: boolean Is the namespace read only?
setValue (line 141)

Set a registry value

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

Transforms a namespace to an array

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

Redefined in descendants as:
toObject (line 433)

Transforms a namespace to an object

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

Redefined in descendants as:
toString (line 383)

Get a namespace in a given string format

  • return: Namespace in string format
  • since: 1.1
  • access: public
string toString ([$format $format = 'INI'], [$namespace $namespace = null])
  • $format $format: string Format to return the string in
  • $namespace $namespace: string Namespace to return [optional: null returns the default namespace]

Redefinition of:
JObject::toString()
Object-to-string conversion.

Inherited Methods

Inherited From JObject

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

Documentation generated on Sat, 4 Feb 2006 14:26:20 +0100 by phpDocumentor 1.3.0RC4