‪TYPO3CMS  9.5
TYPO3\CMS\Extbase\Persistence\Generic\QueryResult Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Persistence\Generic\QueryResult:
TYPO3\CMS\Extbase\Persistence\QueryResultInterface

Public Member Functions

 injectObjectManager (ObjectManagerInterface $objectManager)
 
 injectPersistenceManager (\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager)
 
 __construct (\TYPO3\CMS\Extbase\Persistence\QueryInterface $query)
 
 initializeObject ()
 
TYPO3 CMS Extbase Persistence QueryInterface getQuery ()
 
object getFirst ()
 
int count ()
 
array toArray ()
 
bool offsetExists ($offset)
 
mixed offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
mixed current ()
 
mixed key ()
 
 next ()
 
 rewind ()
 
bool valid ()
 
 __wakeup ()
 
array __sleep ()
 

Protected Member Functions

 initialize ()
 

Protected Attributes

TYPO3 CMS Extbase Persistence Generic Mapper DataMapper $dataMapper
 
TYPO3 CMS Extbase Persistence PersistenceManagerInterface $persistenceManager
 
int null $numberOfResults
 
TYPO3 CMS Extbase Persistence QueryInterface $query
 
array $queryResult
 
ObjectManagerInterface $objectManager
 

Detailed Description

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

Definition at line 24 of file QueryResult.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::__construct ( \TYPO3\CMS\Extbase\Persistence\QueryInterface  $query)

Constructor

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

Definition at line 71 of file QueryResult.php.

References TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\$query.

Member Function Documentation

◆ __sleep()

array TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::__sleep ( )
Returns
‪array

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 270 of file QueryResult.php.

◆ __wakeup()

TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::__wakeup ( )

Ensures that the objectManager, persistenceManager and dataMapper are back when loading the QueryResult from the cache

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 259 of file QueryResult.php.

References TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\$objectManager, and TYPO3\CMS\Extbase\Object\ObjectManagerInterface\get().

◆ count()

int TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::count ( )

Returns the number of objects in the result

Returns
‪int The number of matching objects

Definition at line 131 of file QueryResult.php.

References TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\$numberOfResults.

◆ current()

mixed TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::current ( )

◆ getFirst()

◆ getQuery()

TYPO3 CMS Extbase Persistence QueryInterface TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::getQuery ( )

Returns a clone of the query object

Returns
‪\TYPO3\CMS\Extbase\Persistence\QueryInterface

Implements TYPO3\CMS\Extbase\Persistence\QueryResultInterface.

Definition at line 99 of file QueryResult.php.

References TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\$query.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\getFirst().

◆ initialize()

◆ initializeObject()

TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::initializeObject ( )

Object initialization called when object is created with ObjectManager, after constructor

Definition at line 79 of file QueryResult.php.

◆ injectObjectManager()

TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::injectObjectManager ( ObjectManagerInterface  $objectManager)
Parameters
ObjectManagerInterface$objectManager

Definition at line 53 of file QueryResult.php.

References TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\$objectManager.

◆ injectPersistenceManager()

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

Definition at line 61 of file QueryResult.php.

References TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\$persistenceManager.

◆ key()

mixed TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::key ( )
Returns
‪mixed
See also
‪Iterator::key()

Definition at line 220 of file QueryResult.php.

References TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\initialize().

◆ next()

TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::next ( )
See also
‪Iterator::next()

Definition at line 229 of file QueryResult.php.

References TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\initialize().

◆ offsetExists()

bool TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::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 TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\initialize().

◆ offsetGet()

mixed TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::offsetGet (   $offset)
Parameters
mixed$offset
Returns
‪mixed
See also
‪ArrayAccess::offsetGet()

Definition at line 173 of file QueryResult.php.

References TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\initialize().

◆ offsetSet()

TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::offsetSet (   $offset,
  $value 
)

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

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

Definition at line 186 of file QueryResult.php.

References TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\initialize().

◆ offsetUnset()

TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::offsetUnset (   $offset)

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

Parameters
mixed$offset
See also
‪ArrayAccess::offsetUnset()

Definition at line 199 of file QueryResult.php.

References TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\initialize().

◆ rewind()

TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::rewind ( )
See also
‪Iterator::rewind()

Definition at line 238 of file QueryResult.php.

References TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\initialize().

◆ toArray()

array TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::toArray ( )

Returns an array with the objects in the result set

Returns
‪array

Implements TYPO3\CMS\Extbase\Persistence\QueryResultInterface.

Definition at line 148 of file QueryResult.php.

References TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\initialize().

◆ valid()

bool TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::valid ( )
Returns
‪bool
See also
‪Iterator::valid()

Definition at line 248 of file QueryResult.php.

References TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\current(), and TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\initialize().

Member Data Documentation

◆ $dataMapper

TYPO3 CMS Extbase Persistence Generic Mapper DataMapper TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::$dataMapper
protected

Definition at line 28 of file QueryResult.php.

◆ $numberOfResults

int null TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::$numberOfResults
protected

◆ $objectManager

ObjectManagerInterface TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::$objectManager
protected

◆ $persistenceManager

TYPO3 CMS Extbase Persistence PersistenceManagerInterface TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::$persistenceManager
protected

◆ $query

TYPO3 CMS Extbase Persistence QueryInterface TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::$query
protected

◆ $queryResult

array TYPO3\CMS\Extbase\Persistence\Generic\QueryResult::$queryResult
protected