PHP Class Gc\Registry

Inheritance: extends ArrayObjec\ArrayObject
Mostrar archivo Open project: gotcms/gotcms Class Usage Examples

Public Methods

Method Description
__construct ( array $array = [], integer $flags = parent::ARRAY_AS_PROPS ) Constructs a parent ArrayObject with default ARRAY_AS_PROPS to allow acces as an object
get ( string $index ) : mixed getter method, basically same as offsetGet().
getInstance ( ) : Registry Retrieves the default registry instance.
isRegistered ( string $index ) : boolean Returns true if the $index is a named value in the registry, or false if $index was not found in the registry.
offsetExists ( string $index ) : boolean Returns true if the $index is a named value in the registry, or false if $index was not found in the registry.
set ( string $index, mixed $value ) : void setter method, basically same as offsetSet().
setInstance ( Registry $registry ) : void Set the default registry instance to a specified instance.
unsetInstance ( ) : void Unset the default registry instance.

Protected Methods

Method Description
init ( ) : void Initialize the default registry instance.

Method Details

__construct() public method

Constructs a parent ArrayObject with default ARRAY_AS_PROPS to allow acces as an object
public __construct ( array $array = [], integer $flags = parent::ARRAY_AS_PROPS )
$array array data array
$flags integer ArrayObject flags

get() public static method

This method can be called from an object of type Zendregistry, or it can be called statically. In the latter case, it uses the default static instance stored in the class.
public static get ( string $index ) : mixed
$index string - get the value associated with $index
return mixed

getInstance() public static method

Retrieves the default registry instance.
public static getInstance ( ) : Registry
return Registry

init() protected static method

Initialize the default registry instance.
protected static init ( ) : void
return void

isRegistered() public static method

Returns true if the $index is a named value in the registry, or false if $index was not found in the registry.
public static isRegistered ( string $index ) : boolean
$index string Index
return boolean

offsetExists() public method

Returns true if the $index is a named value in the registry, or false if $index was not found in the registry.
public offsetExists ( string $index ) : boolean
$index string Index
return boolean

set() public static method

This method can be called from an object of type Zendregistry, or it can be called statically. In the latter case, it uses the default static instance stored in the class.
public static set ( string $index, mixed $value ) : void
$index string The location in the ArrayObject in which to store the value.
$value mixed The object to store in the ArrayObject.
return void

setInstance() public static method

Set the default registry instance to a specified instance.
public static setInstance ( Registry $registry ) : void
$registry Registry An object instance of type Registry, or a subclass.
return void

unsetInstance() public static method

Primarily used in tearDown() in unit tests.
public static unsetInstance ( ) : void
return void