Open Journal Systems
3.3.0
|
Namespaces | |
Test | |
Data Structures | |
class | ArrayList |
interface | Collection |
class | Collections |
interface | Comparable |
class | Comparator |
interface | ToArrayInterface |
Functions | |
add ($key, $element) | |
append ($element) | |
clear () | |
count () | |
current () | |
filter (\Closure $closure) | |
filterByKeys (array $keys) | |
flatten () | |
get ($key) | |
getIterator () | |
hasKey ($key) | |
hasValue ($value) | |
map (\closure $mapFunction) | |
next () | |
offsetExists ($offset) | |
offsetGet ($offset) | |
offsetSet ($offset, $value) | |
offsetUnset ($offset) | |
prev () | |
remove ($key) | |
replace (array $data) | |
set ($key, $element) | |
setArray (array $array) | |
shuffle () | |
toArray () | |
Variables | |
trait | ArrayListTrait |
Created by PhpStorm. User: seboettg Date: 09.05.18 Time: 17:50
Seboettg\Collection\add | ( | $key, | |
$element | |||
) |
Inserts the specified element at the specified position in this list. If an other element already exist at the specified position the affected positions will transformed into a numerated array. As well the existing element as the specified element will be appended to this array.
$key | |
$element |
Definition at line 126 of file ArrayListTrait.php.
Seboettg\Collection\append | ( | $element | ) |
Appends the specified element to the end of this list.
$element |
Definition at line 111 of file ArrayListTrait.php.
Seboettg\Collection\clear | ( | ) |
Seboettg\Collection\count | ( | ) |
Definition at line 253 of file ArrayListTrait.php.
Referenced by Seboettg\Collection\Test\ArrayListTest\testShuffle(), and Seboettg\Collection\Test\CollectionsTest\testSortCustomOrder().
Seboettg\Collection\current | ( | ) |
Returns the value of the array element that's currently being pointed to by the internal pointer. It does not move the pointer in any way. If the internal pointer points beyond the end of the elements list or the array is empty, current returns false.
Definition at line 53 of file ArrayListTrait.php.
Seboettg\Collection\filter | ( | \Closure | $closure | ) |
returns a clone of this ArrayList, filtered by the given closure function
\Closure | $closure |
Definition at line 273 of file ArrayListTrait.php.
Seboettg\Collection\filterByKeys | ( | array | $keys | ) |
returns a clone of this ArrayList, filtered by the given array keys
array | $keys |
Definition at line 283 of file ArrayListTrait.php.
Seboettg\Collection\flatten | ( | ) |
Returns a new ArrayList containing an one-dimensional array of all elements of this ArrayList. Keys are going lost.
Definition at line 306 of file ArrayListTrait.php.
Seboettg\Collection\get | ( | $key | ) |
returns element with key $key
$key |
Definition at line 40 of file ArrayListTrait.php.
Seboettg\Collection\getIterator | ( | ) |
Definition at line 192 of file ArrayListTrait.php.
Seboettg\Collection\hasKey | ( | $key | ) |
Returns true if an element exists on the specified position.
mixed | $key |
Definition at line 158 of file ArrayListTrait.php.
Seboettg\Collection\hasValue | ( | $value | ) |
Returns true if the specified value exists in this list. Uses PHP's array_search function string $value mixed
Definition at line 171 of file ArrayListTrait.php.
Seboettg\Collection\map | ( | \closure | $mapFunction | ) |
returns a new ArrayList containing all the elements of this ArrayList after applying the callback function to each one.
\closure | $mapFunction |
Definition at line 297 of file ArrayListTrait.php.
Seboettg\Collection\next | ( | ) |
Advance the internal array pointer of an array. Returns the array value in the next place that's pointed to by the internal array pointer, or false if there are no more elements.
Definition at line 65 of file ArrayListTrait.php.
Seboettg\Collection\offsetExists | ( | $offset | ) |
Whether a offset exists mixed $offset bool
Definition at line 227 of file ArrayListTrait.php.
Seboettg\Collection\offsetGet | ( | $offset | ) |
Offset to retrieve mixed $offset The offset to retrieve. mixed Can return all value types.
Definition at line 204 of file ArrayListTrait.php.
Seboettg\Collection\offsetSet | ( | $offset, | |
$value | |||
) |
Offset to set mixed $offset The offset to assign the value to. mixed $value The value to set.
Definition at line 215 of file ArrayListTrait.php.
Seboettg\Collection\offsetUnset | ( | $offset | ) |
Offset to unset mixed $offset The offset to unset.
Definition at line 237 of file ArrayListTrait.php.
Seboettg\Collection\prev | ( | ) |
Rewind the internal array pointer. Returns the array value in the previous place that's pointed to by the internal array pointer, or false if there are no more
Definition at line 77 of file ArrayListTrait.php.
Seboettg\Collection\remove | ( | $key | ) |
Removes the element at the specified position in this list.
$key |
Definition at line 146 of file ArrayListTrait.php.
Seboettg\Collection\replace | ( | array | $data | ) |
replaces this list by the specified array
array | $data |
Definition at line 183 of file ArrayListTrait.php.
Referenced by Seboettg\Collection\setArray().
Seboettg\Collection\set | ( | $key, | |
$element | |||
) |
Inserts or replaces the element at the specified position in this list with the specified element.
$key | |
$element |
Definition at line 89 of file ArrayListTrait.php.
Seboettg\Collection\setArray | ( | array | $array | ) |
overrides contents of ArrayList with the contents of $array
array | $array |
Definition at line 100 of file ArrayListTrait.php.
References Seboettg\Collection\replace().
Seboettg\Collection\shuffle | ( | ) |
Shuffles this list (randomizes the order of the elements in). It uses the PHP function shuffle
Definition at line 263 of file ArrayListTrait.php.
Seboettg\Collection\toArray | ( | ) |
Definition at line 245 of file ArrayListTrait.php.
trait Seboettg::Collection\ArrayListTrait |
Definition at line 13 of file ArrayListTrait.php.