TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
QueryResult Class Reference
Inheritance diagram for QueryResult:
QueryResultInterface

Public Member Functions

 injectDataMapper (\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper)
 
 injectPersistenceManager (\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager)
 
 __construct (\TYPO3\CMS\Extbase\Persistence\QueryInterface $query)
 
 getQuery ()
 
 getFirst ()
 
 count ()
 
 toArray ()
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 current ()
 
 key ()
 
 next ()
 
 rewind ()
 
 valid ()
 
 __wakeup ()
 
 __sleep ()
 

Protected Member Functions

 initialize ()
 

Protected Attributes

 $dataMapper
 
 $persistenceManager
 
 $numberOfResults
 
 $query
 
 $queryResult
 

Detailed Description

A lazy result list that is returned by Query::execute()

Definition at line 24 of file QueryResult.php.

Constructor & Destructor Documentation

Constructor

Parameters
\TYPO3\CMS\Extbase\Persistence\QueryInterface$query

Definition at line 73 of file QueryResult.php.

References QueryResult\$query.

Member Function Documentation

__sleep ( )
Returns
array

Definition at line 269 of file QueryResult.php.

__wakeup ( )
Returns
void

Definition at line 259 of file QueryResult.php.

References GeneralUtility\makeInstance().

count ( )

Returns the number of objects in the result

Returns
int The number of matching objects

Definition at line 130 of file QueryResult.php.

References QueryResult\$numberOfResults.

current ( )
Returns
mixed
See also
Iterator::current()

Definition at line 210 of file QueryResult.php.

References QueryResult\initialize().

Referenced by QueryResult\getFirst(), and QueryResult\valid().

getFirst ( )

Returns the first object in the result set

Returns
object

Implements QueryResultInterface.

Definition at line 107 of file QueryResult.php.

References QueryResult\$query, QueryResult\$queryResult, QueryResult\current(), and QueryResult\getQuery().

getQuery ( )

Returns a clone of the query object

Returns

Implements QueryResultInterface.

Definition at line 96 of file QueryResult.php.

References QueryResult\$query.

Referenced by QueryResult\getFirst().

injectDataMapper ( \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper  $dataMapper)
Parameters
\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper$dataMapper

Definition at line 55 of file QueryResult.php.

References QueryResult\$dataMapper.

injectPersistenceManager ( \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface  $persistenceManager)
Parameters
\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface$persistenceManager

Definition at line 63 of file QueryResult.php.

References QueryResult\$persistenceManager.

key ( )
Returns
mixed
See also
Iterator::key()

Definition at line 220 of file QueryResult.php.

References QueryResult\initialize().

next ( )
Returns
void
See also
Iterator::next()

Definition at line 230 of file QueryResult.php.

References QueryResult\initialize().

offsetExists (   $offset)

This method is needed to implement the ArrayAccess interface, but it isn't very useful as the offset has to be an integer

Parameters
mixed$offset
Returns
bool
See also
ArrayAccess::offsetExists()

Definition at line 162 of file QueryResult.php.

References QueryResult\initialize().

offsetGet (   $offset)
Parameters
mixed$offset
Returns
mixed
See also
ArrayAccess::offsetGet()

Definition at line 173 of file QueryResult.php.

References QueryResult\initialize().

offsetSet (   $offset,
  $value 
)

This method has no effect on the persisted objects but only on the result set

Parameters
mixed$offset
mixed$value
Returns
void
See also
ArrayAccess::offsetSet()

Definition at line 187 of file QueryResult.php.

References QueryResult\initialize().

offsetUnset (   $offset)

This method has no effect on the persisted objects but only on the result set

Parameters
mixed$offset
Returns
void
See also
ArrayAccess::offsetUnset()

Definition at line 200 of file QueryResult.php.

References QueryResult\initialize().

rewind ( )
Returns
void
See also
Iterator::rewind()

Definition at line 240 of file QueryResult.php.

References QueryResult\initialize().

toArray ( )

Returns an array with the objects in the result set

Returns
array

Implements QueryResultInterface.

Definition at line 148 of file QueryResult.php.

References QueryResult\initialize().

valid ( )
Returns
bool
See also
Iterator::valid()

Definition at line 250 of file QueryResult.php.

References QueryResult\current(), and QueryResult\initialize().

Member Data Documentation

$dataMapper
protected

Definition at line 29 of file QueryResult.php.

Referenced by QueryResult\injectDataMapper().

$numberOfResults
protected

Definition at line 39 of file QueryResult.php.

Referenced by QueryResult\count().

$persistenceManager
protected

Definition at line 34 of file QueryResult.php.

Referenced by QueryResult\injectPersistenceManager().

$query
protected
$queryResult
protected

Definition at line 50 of file QueryResult.php.

Referenced by QueryResult\getFirst().