PHP Class Gc\Registry

Inheritance: extends ArrayObjec\ArrayObject
Afficher le fichier Open project: gotcms/gotcms Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
init ( ) : void Initialize the default registry instance.

Method Details

__construct() public méthode

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 méthode

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
Résultat mixed

getInstance() public static méthode

Retrieves the default registry instance.
public static getInstance ( ) : Registry
Résultat Registry

init() protected static méthode

Initialize the default registry instance.
protected static init ( ) : void
Résultat void

isRegistered() public static méthode

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
Résultat boolean

offsetExists() public méthode

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
Résultat boolean

set() public static méthode

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.
Résultat void

setInstance() public static méthode

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.
Résultat void

unsetInstance() public static méthode

Primarily used in tearDown() in unit tests.
public static unsetInstance ( ) : void
Résultat void