PHP Class Neos\Flow\Persistence\Generic\QueryResult

Inheritance: implements Neos\Flow\Persistence\QueryResultInterface
Exibir arquivo Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$dataMapper DataMapper
$numberOfResults array
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$query Neos\Flow\Persistence\QueryInterface
$queryResult array

Public Methods

Method Description
__construct ( Neos\Flow\Persistence\QueryInterface $query ) Constructor
count ( ) : integer Returns the number of objects in the result
current ( ) : mixed
getFirst ( ) : mixed Returns the first object in the result set, if any.
getQuery ( ) : Neos\Flow\Persistence\QueryInterface Returns a clone of the query object
injectDataMapper ( DataMapper $dataMapper ) : void Injects the DataMapper to map records to objects
injectPersistenceManager ( Neos\Flow\Persistence\PersistenceManagerInterface $persistenceManager ) : void Injects the persistence manager
key ( ) : mixed
next ( ) : void
offsetExists ( mixed $offset ) : boolean This method is needed to implement the \ArrayAccess interface, but it isn't very useful as the offset has to be an integer
offsetGet ( mixed $offset ) : mixed
offsetSet ( mixed $offset, mixed $value ) : void This method has no effect on the persisted objects but only on the result set
offsetUnset ( mixed $offset ) : void This method has no effect on the persisted objects but only on the result set
rewind ( ) : void
toArray ( ) : array Returns an array with the objects in the result set
valid ( ) : boolean

Protected Methods

Method Description
initialize ( ) : void Loads the objects this QueryResult is supposed to hold

Method Details

__construct() public method

Constructor
public __construct ( Neos\Flow\Persistence\QueryInterface $query )
$query Neos\Flow\Persistence\QueryInterface

count() public method

Returns the number of objects in the result
public count ( ) : integer
return integer The number of matching objects

current() public method

See also: Iterator::current()
public current ( ) : mixed
return mixed

getFirst() public method

Returns the first object in the result set, if any.
public getFirst ( ) : mixed
return mixed The first object of the result set or NULL if the result set was empty

getQuery() public method

Returns a clone of the query object
public getQuery ( ) : Neos\Flow\Persistence\QueryInterface
return Neos\Flow\Persistence\QueryInterface

initialize() protected method

Loads the objects this QueryResult is supposed to hold
protected initialize ( ) : void
return void

injectDataMapper() public method

Injects the DataMapper to map records to objects
public injectDataMapper ( DataMapper $dataMapper ) : void
$dataMapper DataMapper
return void

injectPersistenceManager() public method

Injects the persistence manager
public injectPersistenceManager ( Neos\Flow\Persistence\PersistenceManagerInterface $persistenceManager ) : void
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
return void

key() public method

See also: Iterator::key()
public key ( ) : mixed
return mixed

next() public method

See also: Iterator::next()
public next ( ) : void
return void

offsetExists() public method

This method is needed to implement the \ArrayAccess interface, but it isn't very useful as the offset has to be an integer
See also: ArrayAccess::offsetExists()
public offsetExists ( mixed $offset ) : boolean
$offset mixed
return boolean

offsetGet() public method

See also: ArrayAccess::offsetGet()
public offsetGet ( mixed $offset ) : mixed
$offset mixed
return mixed

offsetSet() public method

This method has no effect on the persisted objects but only on the result set
See also: ArrayAccess::offsetSet()
public offsetSet ( mixed $offset, mixed $value ) : void
$offset mixed
$value mixed
return void

offsetUnset() public method

This method has no effect on the persisted objects but only on the result set
See also: ArrayAccess::offsetUnset()
public offsetUnset ( mixed $offset ) : void
$offset mixed
return void

rewind() public method

See also: Iterator::rewind()
public rewind ( ) : void
return void

toArray() public method

Returns an array with the objects in the result set
public toArray ( ) : array
return array

valid() public method

See also: Iterator::valid()
public valid ( ) : boolean
return boolean

Property Details

$dataMapper protected_oe property

protected DataMapper,Neos\Flow\Persistence\Generic $dataMapper
return DataMapper

$numberOfResults protected_oe property

protected array $numberOfResults
return array

$persistenceManager protected_oe property

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
return Neos\Flow\Persistence\PersistenceManagerInterface

$query protected_oe property

protected QueryInterface,Neos\Flow\Persistence $query
return Neos\Flow\Persistence\QueryInterface

$queryResult protected_oe property

protected array $queryResult
return array