Method |
Description |
|
__construct ( array | Iterator | IteratorAggregat\IteratorAggregate $dataSource ) |
Creates a new Linq object using the provided dataSource. |
|
aggregate ( callable $func, mixed $seed = null ) : mixed |
Applies an accumulator function over a sequence. |
|
all ( callable $func ) : boolean |
Determines whether all elements satisfy a condition. |
|
any ( callable $func = null ) : boolean |
Determines whether any element exists or satisfies a condition by invoking $func. |
|
average ( callable $func = null ) : double |
Computes the average of all numeric values. Uses $func to obtain the value on each element. |
|
chunk ( integer $chunksize ) : Linq |
Splits the sequence in chunks according to $chunksize. |
|
concat ( array | Iterator $second ) : Linq |
Concatenates this Linq object with the given sequence. |
|
contains ( mixed $value ) : boolean |
Determines whether a sequence contains a specified element. |
|
count ( ) : integer |
Counts the elements of this Linq sequence. |
|
distinct ( callable $func = null ) : Linq |
Returns distinct item values of this |
|
each ( callable $func ) : void |
Immediately performs the specified action on each element of the Linq sequence. |
|
elementAt ( integer $index ) : mixed |
Returns the element at a specified index. |
|
elementAtOrNull ( $index ) : mixed |
Returns the element at a specified index or NULL if the index is out of range. |
|
except ( array | Iterator $second ) : Linq |
Returns all elements except the ones of the given sequence. |
|
first ( callable $func = null ) : mixed |
Returns the first element that satisfies a specified condition |
|
firstOrNull ( callable $func = null ) : mixed |
Returns the first element, or NULL if the sequence contains no elements. |
|
from ( array | Iterator | IteratorAggregat\IteratorAggregate $dataSource ) : Linq |
Creates a new Linq object using the provided dataDataSource. |
|
getIterator ( ) : Traversable |
Retrieves the iterator of this Linq class. |
|
groupBy ( callable $keySelector ) : Fusonic\Linq\GroupedLinq |
Groups the object according to the $func generated key |
|
intersect ( $second ) : Linq |
Intersects the Linq sequence with second Iterable sequence. |
|
last ( callable $func = null ) : Object |
Returns the last element that satisfies a specified condition. |
|
lastOrNull ( callable $func = null ) : mixed |
Returns the last element that satisfies a condition or NULL if no such element is found. |
|
max ( callable $func = null ) : double |
Returns the maximum item value according to $func |
|
min ( callable $func = null ) : double |
Gets the minimum item value of all items or by invoking a transform function on each item to get a numeric value. |
|
ofType ( string $type ) : Linq |
Filters the Linq object according to type. |
|
orderBy ( callable $func ) : Linq |
Sorts the elements in ascending order according to a key provided by $func. |
|
orderByDescending ( callable $func ) : Linq |
Sorts the elements in descending order according to a key provided by $func. |
|
range ( $start, $count ) : Linq |
Generates a sequence of integral numbers within a specified range. |
|
select ( callable $func ) : Linq |
Projects each element into a new form by invoking the selector function. |
|
selectMany ( callable $func ) : Linq |
Projects each element of a sequence to a new Linq and flattens the resulting sequences into one sequence. |
|
single ( callable $func = null ) : mixed |
Returns the only element that satisfies a specified condition. |
|
singleOrNull ( callable $func = null ) : mixed |
Returns the only element that satisfies a specified condition or NULL if no such element exists. |
|
skip ( integer $count ) : Linq |
Bypasses a specified number of elements and then returns the remaining elements. |
|
sum ( callable $func = null ) : double |
Gets the sum of all items or by invoking a transform function on each item to get a numeric value. |
|
take ( integer $count ) : Linq |
Returns a specified number of contiguous elements from the start of a sequence |
|
toArray ( callable $keySelector = null, callable $valueSelector = null ) : array |
Creates an Array from this Linq object with key/value selector(s). |
|
where ( callable $func ) : Linq |
Filters the Linq object according to func return result. |
|