Метод |
Описание |
|
__construct ( array $results = [], array $resultsIdentities = [], $entityName = null ) |
Constructor function |
|
__toString ( ) |
Provides a string representation of the class
Brackets contain the number of elements contained
in the collection |
|
add ( object $entity ) |
Add a single entity to the collection |
|
count ( ) |
Get a count of all the records in the result set |
|
current ( ) |
---------------------------------------------- |
|
entityName ( ) |
|
|
filter ( $func ) : mixed |
Runs a function on every object in the query, returning an array containing every
object for which the function returns true. |
|
first ( ) : The |
Returns first result in set |
|
key ( ) |
|
|
map ( $func ) : mixed |
Runs a function on every object in the query, returning the resulting array |
|
merge ( Collection $collection, $onlyUnique = true ) |
Merge another collection into this collections set of entities
This will only add entitys that don't already exist in the current
collection |
|
next ( ) |
|
|
offsetExists ( $key ) |
---------------------------------------------- |
|
offsetGet ( $key ) |
|
|
offsetSet ( $key, $value ) |
|
|
offsetUnset ( $key ) |
|
|
rewind ( ) |
|
|
run ( $callback ) |
Run a function on the set of entities |
|
toArray ( mixed $keyColumn = null, mixed $valueColumn = null ) : array |
Return an array representation of the Collection. |
|
valid ( ) |
|
|