PHP Класс Gc\Registry

Наследование: extends ArrayObjec\ArrayObject
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
init ( ) : void Initialize the default registry instance.

Описание методов

__construct() публичный Метод

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() публичный статический Метод

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
Результат mixed

getInstance() публичный статический Метод

Retrieves the default registry instance.
public static getInstance ( ) : Registry
Результат Registry

init() защищенный статический Метод

Initialize the default registry instance.
protected static init ( ) : void
Результат void

isRegistered() публичный статический Метод

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
Результат boolean

offsetExists() публичный Метод

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
Результат boolean

set() публичный статический Метод

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.
Результат void

setInstance() публичный статический Метод

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.
Результат void

unsetInstance() публичный статический Метод

Primarily used in tearDown() in unit tests.
public static unsetInstance ( ) : void
Результат void