ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Collection.php
Go to the documentation of this file.
1 <?php
2 
3 namespace SAML2\Utilities;
4 
5 interface Collection extends \ArrayAccess, \Countable, \IteratorAggregate
6 {
14  public function add($element);
15 
23  public function getOnlyElement();
24 
30  public function first();
31 
37  public function last();
38 
46  public function map(\Closure $function);
47 
53  public function filter(\Closure $filterFunction);
54 
62  public function get($key);
63 
67  public function remove($element);
68 
75  public function set($key, $value);
76 }
map(\Closure $function)
Applies the given function to each element in the collection and returns a new collection with the el...
add($element)
Add an element to the collection.
last()
Return the last element from the collection.
filter(\Closure $filterFunction)
getOnlyElement()
Shorthand for getting a single element that also must be the only element in the collection.
first()
Return the first element from the collection.
$function
Definition: cas.php:28
$key
Definition: croninfo.php:18