ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilBuddySystemCollection Interface Reference

Interface ilBuddySystemCollection. More...

+ Inheritance diagram for ilBuddySystemCollection:
+ Collaboration diagram for ilBuddySystemCollection:

Public Member Functions

 add (mixed $element)
 Adds an element at the end of the collection. More...
 
 remove (string|int $key)
 
 removeElement (mixed $element)
 
 containsKey (string|int $key)
 
 getKey (mixed $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)
 

Detailed Description

Interface ilBuddySystemCollection.

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de T TKey -extends IteratorAggregate<TKey, T> -extends ArrayAccess<TKey, T>

Definition at line 29 of file interface.ilBuddySystemCollection.php.

Member Function Documentation

◆ add()

ilBuddySystemCollection::add ( mixed  $element)

Adds an element at the end of the collection.

-param T $element

Implemented in ilBuddySystemArrayCollection.

◆ clear()

ilBuddySystemCollection::clear ( )

Clears the list.

Implemented in ilBuddySystemArrayCollection.

◆ contains()

ilBuddySystemCollection::contains ( mixed  $element)

-param T $element

Returns
bool true if the collection contains the element, false otherwise.

Implemented in ilBuddySystemArrayCollection.

◆ containsKey()

ilBuddySystemCollection::containsKey ( string|int  $key)
Parameters
string | int$keyThe index to check for. -param TKey $key
Returns
bool true if the collection contains the element, false otherwise.

Implemented in ilBuddySystemArrayCollection.

◆ equals()

ilBuddySystemCollection::equals ( mixed  $other)

◆ filter()

ilBuddySystemCollection::filter ( callable  $callable)

Returns all the elements of this collection that satisfy the predicate $callable.

Implemented in ilBuddySystemArrayCollection.

Referenced by ilBuddySystemRelationStateFilterRule\getStates().

+ Here is the caller graph for this function:

◆ get()

ilBuddySystemCollection::get ( string|int  $key)
Parameters
string | int$keyThe index of the element to get. -param TKey $key -return T|null

Implemented in ilBuddySystemArrayCollection.

◆ getKey()

ilBuddySystemCollection::getKey ( mixed  $element)
Parameters
mixed$elementThe element -param T $element
Returns
string|int The index of the element. -return TKey

◆ getKeys()

ilBuddySystemCollection::getKeys ( )

Gets all indices of the collection.

Returns
string[]|int[] The indices of the collection, in the order of the corresponding elements in the collection. -return list<TKey>

Implemented in ilBuddySystemArrayCollection.

◆ getValues()

ilBuddySystemCollection::getValues ( )

Gets all values of the collection.

Returns
list<mixed> The values of all elements in the collection, in the order they appear in the collection. -return list<T>

Implemented in ilBuddySystemArrayCollection.

◆ isEmpty()

ilBuddySystemCollection::isEmpty ( )
Returns
bool true if the collection is empty, false otherwise.

Implemented in ilBuddySystemArrayCollection.

◆ remove()

ilBuddySystemCollection::remove ( string|int  $key)
Parameters
string | int$keyThe index of the element to remove. -param TKey $key
Exceptions
InvalidArgumentException

Implemented in ilBuddySystemArrayCollection.

◆ removeElement()

ilBuddySystemCollection::removeElement ( mixed  $element)
Parameters
mixed$elementThe element to remove. -param T $element
Exceptions
InvalidArgumentException

Implemented in ilBuddySystemArrayCollection.

◆ set()

ilBuddySystemCollection::set ( string|int  $key,
mixed  $value 
)
Parameters
string | int$keyThe index of the element to set. -param TKey $key -param T $value

Implemented in ilBuddySystemArrayCollection.

◆ slice()

ilBuddySystemCollection::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.

Parameters
int$offsetThe offset to start from.
int | null$lengthThe maximum number of elements to return, or null for no limit.

Implemented in ilBuddySystemArrayCollection.

◆ toArray()

ilBuddySystemCollection::toArray ( )
Returns
array<int|string, mixed> -return array<TKey, T>

Implemented in ilBuddySystemArrayCollection.


The documentation for this interface was generated from the following file: