ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Simple Array implementation of Collection. More...
Public Member Functions | |
__construct (array $elements=array()) | |
add ($element) | |
Add an element to the collection. More... | |
get ($key) | |
Get the element at index. More... | |
filter (\Closure $f) | |
set ($key, $value) | |
Set the value for index. More... | |
remove ($element) | |
getOnlyElement () | |
Shorthand for getting a single element that also must be the only element in the collection. More... | |
first () | |
Return the first element from the collection. More... | |
last () | |
Return the last element from the collection. More... | |
map (\Closure $function) | |
Applies the given function to each element in the collection and returns a new collection with the elements returned by the function. More... | |
count () | |
getIterator () | |
offsetExists ($offset) | |
offsetGet ($offset) | |
offsetSet ($offset, $value) | |
offsetUnset ($offset) | |
add ($element) | |
Add an element to the collection. More... | |
getOnlyElement () | |
Shorthand for getting a single element that also must be the only element in the collection. More... | |
first () | |
Return the first element from the collection. More... | |
last () | |
Return the last element from the collection. More... | |
map (\Closure $function) | |
Applies the given function to each element in the collection and returns a new collection with the elements returned by the function. More... | |
filter (\Closure $filterFunction) | |
get ($key) | |
Get the element at index. More... | |
remove ($element) | |
set ($key, $value) | |
Set the value for index. More... | |
Protected Attributes | |
$elements | |
Simple Array implementation of Collection.
@SuppressWarnings(PHPMD.TooManyMethods) - it just has a large api.
Definition at line 12 of file ArrayCollection.php.
SAML2\Utilities\ArrayCollection::__construct | ( | array | $elements = array() | ) |
Definition at line 19 of file ArrayCollection.php.
References SAML2\Utilities\ArrayCollection\$elements.
SAML2\Utilities\ArrayCollection::add | ( | $element | ) |
Add an element to the collection.
$element |
Implements SAML2\Utilities\Collection.
Reimplemented in SAML2\Certificate\FingerprintCollection, and SAML2\Certificate\KeyCollection.
Definition at line 24 of file ArrayCollection.php.
SAML2\Utilities\ArrayCollection::count | ( | ) |
Definition at line 86 of file ArrayCollection.php.
References SAML2\Utilities\ArrayCollection\count().
Referenced by SAML2\Utilities\ArrayCollection\count(), and SAML2\Utilities\ArrayCollection\getOnlyElement().
SAML2\Utilities\ArrayCollection::filter | ( | \Closure | $filterFunction | ) |
callable | $filterFunction |
Implements SAML2\Utilities\Collection.
Definition at line 34 of file ArrayCollection.php.
SAML2\Utilities\ArrayCollection::first | ( | ) |
Return the first element from the collection.
Implements SAML2\Utilities\Collection.
Definition at line 71 of file ArrayCollection.php.
SAML2\Utilities\ArrayCollection::get | ( | $key | ) |
Get the element at index.
mixed | $key |
Implements SAML2\Utilities\Collection.
Definition at line 29 of file ArrayCollection.php.
References $key.
SAML2\Utilities\ArrayCollection::getIterator | ( | ) |
Definition at line 91 of file ArrayCollection.php.
SAML2\Utilities\ArrayCollection::getOnlyElement | ( | ) |
Shorthand for getting a single element that also must be the only element in the collection.
SAML2\Exception\RuntimeException if the element was not the only element
Implements SAML2\Utilities\Collection.
Definition at line 58 of file ArrayCollection.php.
References SAML2\Utilities\ArrayCollection\count(), and sprintf.
SAML2\Utilities\ArrayCollection::last | ( | ) |
Return the last element from the collection.
Implements SAML2\Utilities\Collection.
Definition at line 76 of file ArrayCollection.php.
SAML2\Utilities\ArrayCollection::map | ( | \Closure | $function | ) |
Applies the given function to each element in the collection and returns a new collection with the elements returned by the function.
callable | $function |
Implements SAML2\Utilities\Collection.
Definition at line 81 of file ArrayCollection.php.
References $function.
SAML2\Utilities\ArrayCollection::offsetExists | ( | $offset | ) |
Definition at line 96 of file ArrayCollection.php.
SAML2\Utilities\ArrayCollection::offsetGet | ( | $offset | ) |
Definition at line 101 of file ArrayCollection.php.
SAML2\Utilities\ArrayCollection::offsetSet | ( | $offset, | |
$value | |||
) |
Definition at line 106 of file ArrayCollection.php.
SAML2\Utilities\ArrayCollection::offsetUnset | ( | $offset | ) |
Definition at line 111 of file ArrayCollection.php.
SAML2\Utilities\ArrayCollection::remove | ( | $element | ) |
$element |
Implements SAML2\Utilities\Collection.
Definition at line 44 of file ArrayCollection.php.
References $key.
SAML2\Utilities\ArrayCollection::set | ( | $key, | |
$value | |||
) |
Set the value for index.
mixed | $key | |
mixed | $value |
Implements SAML2\Utilities\Collection.
Definition at line 39 of file ArrayCollection.php.
References $key.
|
protected |
Definition at line 17 of file ArrayCollection.php.
Referenced by SAML2\Utilities\ArrayCollection\__construct().