| 
    ILIAS
    release_9 Revision v9.13-25-g2c18ec4c24f
    
   | 
  
Class ilBuddySystemArrayCollection A generic array based collection class. More...
 Inheritance diagram for ilBuddySystemArrayCollection:
 Collaboration diagram for ilBuddySystemArrayCollection:Public Member Functions | |
| __construct (private array $elements=[]) | |
| getIterator () | |
| offsetExists (mixed $offset) | |
| offsetGet (mixed $offset) | |
| offsetSet (mixed $offset, mixed $value) | |
| offsetUnset (mixed $offset) | |
| count () | |
| add (mixed $element) | |
| Adds an element at the end of the collection.  More... | |
| remove (string|int $key) | |
| removeElement (mixed $element) | |
| containsKey (string|int $key) | |
| isset is used for performance reasons (array_key_exists is much slower).  More... | |
| getKey ($element) | |
| clear () | |
| Clears the list.  More... | |
| contains (mixed $element) | |
| -param T $element  More... | |
| get (string|int $key) | |
| set (string|int $key, mixed $value) | |
| isEmpty () | |
| getKeys () | |
| Gets all indices of the collection.  More... | |
| getValues () | |
| Gets all values of the collection.  More... | |
| filter (callable $callable) | |
| Returns all the elements of this collection that satisfy the predicate $callable.  More... | |
| slice (int $offset, int $length=null) | |
| Extracts a slice of $length elements starting at position $offset from the Collection.  More... | |
| toArray () | |
| equals (mixed $other) | |
  Public Member Functions inherited from ilBuddySystemCollection | |
| getKey (mixed $element) | |
Class ilBuddySystemArrayCollection A generic array based collection class.
Definition at line 29 of file class.ilBuddySystemArrayCollection.php.
| ilBuddySystemArrayCollection::__construct | ( | private array | $elements = [] | ) | 
| array<string|int,mixed> | $elements -param array<TKey, T> $elements | 
Definition at line 35 of file class.ilBuddySystemArrayCollection.php.
| ilBuddySystemArrayCollection::add | ( | mixed | $element | ) | 
Adds an element at the end of the collection.
-param T $element
Implements ilBuddySystemCollection.
Definition at line 75 of file class.ilBuddySystemArrayCollection.php.
Referenced by offsetSet().
 Here is the caller graph for this function:| ilBuddySystemArrayCollection::clear | ( | ) | 
Clears the list.
Implements ilBuddySystemCollection.
Definition at line 113 of file class.ilBuddySystemArrayCollection.php.
| ilBuddySystemArrayCollection::contains | ( | mixed | $element | ) | 
-param T $element
Implements ilBuddySystemCollection.
Definition at line 118 of file class.ilBuddySystemArrayCollection.php.
| ilBuddySystemArrayCollection::containsKey | ( | string|int | $key | ) | 
isset is used for performance reasons (array_key_exists is much slower).
array_key_exists is only used in case of a null value (see https://www.php.net/manual/en/function.array-key-exists.php Example #2 array_key_exists() vs isset()).
Implements ilBuddySystemCollection.
Definition at line 103 of file class.ilBuddySystemArrayCollection.php.
Referenced by offsetExists(), and remove().
 Here is the caller graph for this function:| ilBuddySystemArrayCollection::count | ( | ) | 
Definition at line 70 of file class.ilBuddySystemArrayCollection.php.
| ilBuddySystemArrayCollection::equals | ( | mixed | $other | ) | 
Implements ilBuddySystemCollection.
Definition at line 163 of file class.ilBuddySystemArrayCollection.php.
References toArray().
 Here is the call graph for this function:| ilBuddySystemArrayCollection::filter | ( | callable | $callable | ) | 
Returns all the elements of this collection that satisfy the predicate $callable.
Implements ilBuddySystemCollection.
Definition at line 148 of file class.ilBuddySystemArrayCollection.php.
| ilBuddySystemArrayCollection::get | ( | string|int | $key | ) | 
| string | int | $key | The index of the element to get. -param TKey $key -return T|null | 
Implements ilBuddySystemCollection.
Definition at line 123 of file class.ilBuddySystemArrayCollection.php.
References ILIAS\LTI\ToolProvider\$key.
| ilBuddySystemArrayCollection::getIterator | ( | ) | 
Definition at line 39 of file class.ilBuddySystemArrayCollection.php.
| ilBuddySystemArrayCollection::getKey | ( | $element | ) | 
Definition at line 108 of file class.ilBuddySystemArrayCollection.php.
| ilBuddySystemArrayCollection::getKeys | ( | ) | 
Gets all indices of the collection.
Implements ilBuddySystemCollection.
Definition at line 138 of file class.ilBuddySystemArrayCollection.php.
| ilBuddySystemArrayCollection::getValues | ( | ) | 
Gets all values of the collection.
Implements ilBuddySystemCollection.
Definition at line 143 of file class.ilBuddySystemArrayCollection.php.
| ilBuddySystemArrayCollection::isEmpty | ( | ) | 
Implements ilBuddySystemCollection.
Definition at line 133 of file class.ilBuddySystemArrayCollection.php.
| ilBuddySystemArrayCollection::offsetExists | ( | mixed | $offset | ) | 
Definition at line 44 of file class.ilBuddySystemArrayCollection.php.
References containsKey().
 Here is the call graph for this function:| ilBuddySystemArrayCollection::offsetGet | ( | mixed | $offset | ) | 
Definition at line 49 of file class.ilBuddySystemArrayCollection.php.
| ilBuddySystemArrayCollection::offsetSet | ( | mixed | $offset, | 
| mixed | $value | ||
| ) | 
Definition at line 54 of file class.ilBuddySystemArrayCollection.php.
References add().
 Here is the call graph for this function:| ilBuddySystemArrayCollection::offsetUnset | ( | mixed | $offset | ) | 
Definition at line 65 of file class.ilBuddySystemArrayCollection.php.
| ilBuddySystemArrayCollection::remove | ( | string|int | $key | ) | 
| string | int | $key | The index of the element to remove. -param TKey $key | 
| InvalidArgumentException | 
Implements ilBuddySystemCollection.
Definition at line 80 of file class.ilBuddySystemArrayCollection.php.
References ILIAS\LTI\ToolProvider\$key, and containsKey().
 Here is the call graph for this function:| ilBuddySystemArrayCollection::removeElement | ( | mixed | $element | ) | 
| mixed | $element | The element to remove. -param T $element | 
| InvalidArgumentException | 
Implements ilBuddySystemCollection.
Definition at line 88 of file class.ilBuddySystemArrayCollection.php.
References ILIAS\LTI\ToolProvider\$key.
| ilBuddySystemArrayCollection::set | ( | string|int | $key, | 
| mixed | $value | ||
| ) | 
| string | int | $key | The index of the element to set. -param TKey $key -param T $value | 
Implements ilBuddySystemCollection.
Definition at line 128 of file class.ilBuddySystemArrayCollection.php.
References ILIAS\LTI\ToolProvider\$key.
| ilBuddySystemArrayCollection::slice | ( | int | $offset, | 
| int | $length = null  | 
        ||
| ) | 
Extracts a slice of $length elements starting at position $offset from the Collection.
If $length is null it returns all elements from $offset to the end of the Collection. Calling this method will only return the selected slice and NOT change the elements contained in the collection slice is called on.
| int | $offset | The offset to start from. | 
| int | null | $length | The maximum number of elements to return, or null for no limit. | 
Implements ilBuddySystemCollection.
Definition at line 153 of file class.ilBuddySystemArrayCollection.php.
| ilBuddySystemArrayCollection::toArray | ( | ) | 
Implements ilBuddySystemCollection.
Definition at line 158 of file class.ilBuddySystemArrayCollection.php.
Referenced by equals().
 Here is the caller graph for this function: