Set __construct(
[array
$items = array()]
)
|
|
Constructor
Parámetros:
|
array |
$items: |
Pre-populate set with this key-value array |
Fetch set data
|
Return: | This set's key-value data array |
|
Access: | public |
Countable
Implementation of:
- Countable::count
mixed get(
string
$key, [mixed
$default = null]
)
|
|
Get data value with key
Parámetros:
|
string |
$key: |
The data key |
|
mixed |
$default: |
The value to return if data key does not exist |
|
Return: | The data value, or the default value |
|
Access: | public |
IteratorAggregate
Implementation of:
- IteratorAggregate::getIterator
boolean has(
string
$key
)
|
|
Does this set contain a key?
Parámetros:
|
string |
$key: |
The data key |
Fetch set data keys
|
Return: | This set's key-value data array keys |
|
Access: | public |
mixed normalizeKey(
string
$key
)
|
|
Normalize data key
Used to transform data key into the necessary key format for this set. Used in subclasses like \Slim\Http\Headers.
Parámetros:
|
string |
$key: |
The data key |
|
Return: | The transformed/normalized data key |
|
Access: | protected |
void offsetExists(
$offset
)
|
|
Array Access
Parámetros:
Implementation of:
- ArrayAccess::offsetExists
void offsetGet(
$offset
)
|
|
Parámetros:
Implementation of:
- ArrayAccess::offsetGet
void offsetSet(
$offset,
$value
)
|
|
Parámetros:
Implementation of:
- ArrayAccess::offsetSet
void offsetUnset(
$offset
)
|
|
Parámetros:
Implementation of:
- ArrayAccess::offsetUnset
Closure protect(
\$callable, Closure
$callable
)
|
|
Protect closure from being directly invoked
Parámetros:
|
Closure |
$callable: |
A closure to keep from being invoked and evaluated |
|
Closure |
\$callable: |
|
void remove(
string
$key
)
|
|
Remove value with key from this set
Parámetros:
|
string |
$key: |
The data key |
void replace(
array
$items
)
|
|
Add data to set
Parámetros:
|
array |
$items: |
Key-value array of data to append to this set |
void set(
string
$key, mixed
$value
)
|
|
Set data key to value
Parámetros:
|
string |
$key: |
The data key |
|
mixed |
$value: |
The data value |
mixed singleton(
string
$key, Closure
$value
)
|
|
Ensure a value or object will remain globally unique
Parámetros:
|
string |
$key: |
The value or object name |
|
Closure |
$value: |
The closure that defines the object |
Property Overloading
Parámetros:
void __set(
$key,
$value
)
|
|
Parámetros: