ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Collection.php
Go to the documentation of this file.
1<?php
2
3namespace SAML2\Utilities;
4
5interface 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}
An exception for terminatinating execution or to throw for unit testing.
$key
Definition: croninfo.php:18
last()
Return the last element from the collection.
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.
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.
filter(\Closure $filterFunction)