PHP Class Airship\Engine\State

Inheritance: implements IteratorAggregate, implements ArrayAccess, implements Serializable, implements Countable
Show file Open project: paragonie/airship Class Usage Examples

Public Methods

Method Description
__get ( string $key = null ) : mixed Grab some data
__isset ( mixed $key ) : boolean Does this exist?
__set ( string $key, mixed $value ) Store something in the state
__toString ( ) : string
__unset ( mixed $key ) This runs when a variable is unset
count ( ) : integer How many things are in the registry?
get ( string $key = null ) : mixed Get something
getIterator ( ) : Iterator
instance ( ) : State Return the sole instance of this singleton
offsetExists ( string $key ) : boolean Does it exist?
offsetGet ( string $key ) : mixed Get something
offsetSet ( string $key, mixed $value ) Store an object in the registry
offsetUnset ( mixed $key ) Delete an entry from the registry
serialize ( ) : string Return a JSON encoded representation of the registry
set ( mixed $key = null, mixed $value = null ) Proxy method
unserialize ( string $serialized ) : array

Private Methods

Method Description
__clone ( ) NOP - no cloning allowed
__construct ( ) Create an array object

Method Details

__get() public method

Grab some data
public __get ( string $key = null ) : mixed
$key string
return mixed

__isset() public method

Does this exist?
public __isset ( mixed $key ) : boolean
$key mixed
return boolean

__set() public method

Store something in the state
public __set ( string $key, mixed $value )
$key string
$value mixed

__toString() public method

public __toString ( ) : string
return string

__unset() public method

This runs when a variable is unset
public __unset ( mixed $key )
$key mixed

count() public method

How many things are in the registry?
public count ( ) : integer
return integer

get() public method

Get something
public get ( string $key = null ) : mixed
$key string
return mixed

getIterator() public method

public getIterator ( ) : Iterator
return Iterator

instance() public static method

Return the sole instance of this singleton
public static instance ( ) : State
return State

offsetExists() public method

Does it exist?
public offsetExists ( string $key ) : boolean
$key string
return boolean

offsetGet() public method

Get something
public offsetGet ( string $key ) : mixed
$key string
return mixed

offsetSet() public method

Store an object in the registry
public offsetSet ( string $key, mixed $value )
$key string
$value mixed

offsetUnset() public method

Delete an entry from the registry
public offsetUnset ( mixed $key )
$key mixed

serialize() public method

Return a JSON encoded representation of the registry
public serialize ( ) : string
return string

set() public method

Proxy method
public set ( mixed $key = null, mixed $value = null )
$key mixed
$value mixed

unserialize() public method

public unserialize ( string $serialized ) : array
$serialized string
return array