Represents the results obtained after executing a query for a specific table This object is responsible for correctly nesting result keys reported from the query, casting each field to the correct type and executing the extra queries required for eager loading external associations.
__construct( Cake\ORM\Query $query , Cake\Database\StatementInterface $statement )
Constructor
Cake\ORM\Query $query Cake\Database\StatementInterface $statement __debugInfo( )
Returns an array that can be used to describe the internal state of this object.
array_calculateAssociationMap( Cake\ORM\Query $query )
Calculates the list of associations that should get eager loaded when fetching each record
Cake\ORM\Query $query _calculateColumnMap( Cake\ORM\Query $query )
Creates a map of row keys out of the query select clause that can be used to hydrate nested result sets more quickly.
Cake\ORM\Query $query _calculateTypeMap( )
Creates a map of Type converter classes for each of the columns that should be fetched by this object.
_castValues( string $alias , array $values )
Casts all values from a row brought from a table to the correct PHP type.
$alias $values array_fetchResult( )
Helper function to fetch the next result from the statement or seeded results.
mixed_getTypes( Cake\ORM\Table $table , array $fields )
Returns the Type classes for each of the passed fields belonging to the table.
Cake\ORM\Table $table $fields array_groupResult( mixed $row )
Correctly nests results keys including those coming from associations
$row arraycount( )
Gives the number of rows in the result set.
Part of the Countable interface.
integercurrent( )
Returns the current record in the result iterator
Part of Iterator interface.
array|objectfirst( )
Get the first record from a result set.
This method will also close the underlying statement cursor.
array|objectCake\Collection\CollectionInterface::first() key( )
Returns the key of the current record in the iterator
Part of Iterator interface.
integernext( )
Advances the iterator pointer to the next record
Part of Iterator interface.
rewind( )
Rewinds a ResultSet.
Part of Iterator interface.
Cake\Database\Exceptionserialize( )
Serializes a resultset.
Part of Serializable interface.
stringunserialize( string $serialized )
Unserializes a resultset.
Part of Serializable interface.
$serialized valid( )
Whether there are more results to be fetched from the iterator
Part of Iterator interface.
boolean_unwrap( )
Backwards compatible wrapper for unwrap()
Iteratorappend( mixed $items )
Cake\Collection\CollectionInterface::append() buffered( )
Cake\Collection\Iterator\BufferedIteratorCake\Collection\CollectionInterface::buffered() chunk( mixed $chunkSize )
Cake\Collection\CollectionInterface::chunk() combine( mixed $keyPath , mixed $valuePath , mixed $groupPath null )
Cake\Collection\CollectionInterface::combine() compile( mixed $preserveKeys true )
Cake\Collection\CollectionInterface::compile() contains( mixed $value )
Cake\Collection\CollectionInterface::contains() countBy( mixed $callback )
Cake\Collection\CollectionInterface::countBy() every( callable $c )
Cake\Collection\CollectionInterface::every() extract( mixed $matcher )
Cake\Collection\CollectionInterface::extract() filter( callable $c null )
Cake\Collection\Iterator\FilterIteratorCake\Collection\CollectionInterface::filter() firstMatch( array $conditions )
Cake\Collection\CollectionInterface::firstMatch() groupBy( mixed $callback )
Cake\Collection\CollectionInterface::groupBy() indexBy( mixed $callback )
Cake\Collection\CollectionInterface::indexBy() insert( mixed $path , mixed $values )
Cake\Collection\Iterator\InsertIteratorCake\Collection\CollectionInterface::insert() jsonSerialize( )
Cake\Collection\CollectionInterface::jsonSerialize() listNested( mixed $dir 'desc' , mixed $nestingKey 'children' )
Cake\Collection\Iterator\TreeIteratorCake\Collection\CollectionInterface::listNested() map( callable $c )
Cake\Collection\Iterator\ReplaceIteratorCake\Collection\CollectionInterface::map() match( array $conditions )
Cake\Collection\CollectionInterface::match() max( mixed $callback , mixed $type SORT_NUMERIC )
Cake\Collection\CollectionInterface::max() min( mixed $callback , mixed $type SORT_NUMERIC )
Cake\Collection\CollectionInterface::min() nest( mixed $idPath , mixed $parentPath )
Cake\Collection\CollectionInterface::nest() reduce( callable $c , mixed $zero null )
Cake\Collection\CollectionInterface::reduce() reject( callable $c )
Cake\Collection\Iterator\FilterIteratorCake\Collection\CollectionInterface::reject() sample( mixed $size 10 )
Cake\Collection\CollectionInterface::sample() skip( mixed $howMany )
Cake\Collection\CollectionInterface::skip() sortBy( mixed $callback , mixed $dir SORT_DESC , mixed $type SORT_NUMERIC )
Cake\Collection\CollectionInterface::sortBy() stopWhen( mixed $condition )
Cake\Collection\Iterator\StoppableIteratorCake\Collection\CollectionInterface::stopWhen() sumOf( mixed $matcher null )
Cake\Collection\CollectionInterface::sumOf() take( mixed $size 1 , mixed $from 0 )
Cake\Collection\CollectionInterface::take() through( callable $handler )
Cake\Collection\CollectionInterface::through() toArray( mixed $preserveKeys true )
Cake\Collection\CollectionInterface::toArray() unfold( callable $transformer null )
Cake\Collection\CollectionInterface::unfold() zipWith( mixed $items , mixed $callable )
Cake\Collection\CollectionInterface::zipWith() _createMatcherFilter( array $conditions )
Returns a callable that receives a value and will return whether or not it matches certain condition.
$conditions callable_extract( array|ArrayAccess $data , array $path )
Returns a column from $data that can be extracted by iterating over the column names contained in $path. It will return arrays for elements in represented with {*}
$data $path mixed_propertyExtractor( string|callable $callback )
Returns a callable that can be used to extract a property or column from an array or object based on a dot separated path.
$callback callable_simpleExtract( array|ArrayAccess $data , array $path )
Returns a column from $data that can be extracted by iterating over the column names contained in $path
$data $path mixed
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/3.1/class-Cake.ORM.ResultSet.html