Class Hashtable (namespace Nette\Collections)
Provides the base class for a generic collection of keys and values.
ArrayObject | --Collection | --Hashtable
Implements interfaces:
Direct Known Sub-classes:
| Public Method Summary | |
|---|---|
| bool |
add
(mixed $key, mixed $item)
Inserts the specified element to the map.
|
| void |
append
($item)
Append is not supported.
|
| mixed |
get
(string $key, [mixed $default =
NULL])
Returns variable or $default if there is no element.
|
| void |
getKeys
()
Returns a array of the keys contained in this map.
|
| void |
import
(array|\Traversable $arr)
Import from array or any traversable object.
|
| bool |
offsetExists
(string $key)
Exists item? (\ArrayAccess implementation).
|
| mixed |
offsetGet
(string $key)
Returns item (\ArrayAccess implementation).
|
| void |
offsetSet
(string $key, object $item)
Inserts (replaces) item (\ArrayAccess implementation).
|
| void |
offsetUnset
(string $key)
Removes the element at the specified position in this list.
|
| mixed |
search
(mixed $item)
Returns the key of the first occurrence of the specified element,.
|
| void |
throwKeyNotFound
([$val =
TRUE])
Do throw KeyNotFoundException?
|
| Methods Inherited From Collection |
|---|
| __construct(), append(), beforeAdd(), beforeRemove(), clear(), contains(), exchangeArray(), getClass(), getIterator(), import(), isReadOnly(), remove(), search(), setArray(), setReadOnly(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
| Variable Summary |
|---|
| Method Details | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
line 61 addpublic bool add (mixed $key, mixed $item) Inserts the specified element to the map. Implementation of:
|
|||||||||||||||||||||
|
line 82 appendpublic void append ($item) Append is not supported. Implementation of:
|
|||||||||||||||||||||
|
line 145 getpublic mixed get (string $key, [mixed $default = Returns variable or $default if there is no element.
|
|||||||||||||||||||||
|
line 93 getKeyspublic void getKeys () Returns a array of the keys contained in this map. return array Implementation of:
|
|||||||||||||||||||||
|
line 119 importpublic void import (array|\Traversable $arr) Import from array or any traversable object. Overridden in child classes as:
|
|||||||||||||||||||||
|
line 226 offsetExistspublic bool offsetExists (string $key) Exists item? (\ArrayAccess implementation).
|
|||||||||||||||||||||
|
line 201 offsetGetpublic mixed offsetGet (string $key) Returns item (\ArrayAccess implementation).
|
|||||||||||||||||||||
|
line 183 offsetSetpublic void offsetSet (string $key, object $item) Inserts (replaces) item (\ArrayAccess implementation).
|
|||||||||||||||||||||
|
line 243 offsetUnsetpublic void offsetUnset (string $key) Removes the element at the specified position in this list.
|
|||||||||||||||||||||
|
line 106 searchpublic mixed search (mixed $item) Returns the key of the first occurrence of the specified element,. or FALSE if this map does not contain this element. Implementation of:
|
|||||||||||||||||||||
|
line 165 throwKeyNotFoundpublic void throwKeyNotFound ([$val = Do throw KeyNotFoundException?
|
|||||||||||||||||||||
