public
|
#
__construct( array $items = array() )
Constructor.
Parameters
- $items
- Pre-populate set with this key-value array
|
protected
mixed
|
#
normalizeKey( string $key )
Normalize data key.
Used to transform data key into the necessary key format for this set.
Parameters
Returns
mixed The transformed/normalized data key
|
public
|
#
set( string|array $key, mixed $value )
Set data key to value.
Parameters
- $key
- The data key or key / value pair array
- $value
- The data value
|
public
mixed
|
#
get( string $key, mixed $default = null )
Get data value with key.
Parameters
- $key
- The data key
- $default
- The value to return if data key does not exist
Returns
mixed The data value, or the default value
|
public
|
#
replace( array $items )
Add data to set.
Parameters
- $items
- Key-value array of data to append to this set
|
public
array
|
#
all( )
Fetch set data.
Returns
array This set's key-value data array
|
public
array
|
#
keys( )
Fetch set data keys.
Returns
array This set's key-value data array keys
|
public
boolean
|
#
has( string $key )
Does this set contain a key?
Does this set contain a key?
Parameters
Returns
boolean
|
public
|
#
remove( string $key )
Remove value with key from this set.
Remove value with key from this set.
Parameters
|
public
mixed
|
#
__get( string $key )
Get value
Parameters
Returns
mixed
|
public
|
#
__set( string $key, mixed $value )
|
public
boolean
|
#
__isset( $key )
Determine if value is available.
Determine if value is available.
Returns
boolean
|
public
|
#
__unset( string $key )
Remove a value
Parameters
|
public
|
|
public
boolean
|
#
offsetExists( $offset )
Determine if value is available.
Determine if value is available.
Returns
boolean
Implementation of
ArrayAccess::offsetExists()
|
public
mixed
|
#
offsetGet( string $offset )
Get value
Parameters
Returns
mixed
Implementation of
ArrayAccess::offsetGet()
|
public
|
#
offsetSet( string $offset, mixed $value )
Set value
Parameters
Implementation of
ArrayAccess::offsetSet()
|
public
|
#
offsetUnset( string $offset )
Remove a value
Parameters
Implementation of
ArrayAccess::offsetUnset()
|
public
integer
|
#
count( )
Countable.
Returns
integer
Implementation of
Countable::count()
|
public
ArrayIterator
|
#
getIterator( )
IteratorAggregate.
Returns
ArrayIterator
Implementation of
IteratorAggregate::getIterator()
|
public
mixed
|
#
singleton( string $key, Closure $value )
Ensure a value or object will remain globally unique.
Ensure a value or object will remain globally unique.
Parameters
- $key
- The value or object name
- $value
- The closure that defines the object
Returns
mixed
|
public
Closure
|
#
protect( Closure $callable )
Protect closure from being directly invoked.
Protect closure from being directly invoked.
Parameters
- $callable
- A closure to keep from being invoked and evaluated
Returns
Closure
|