PHP Класс Bravo3\Orm\Query\QueryResult

Наследование: implements Countable, implements Iterator, implements ArrayAccess
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$entities array
$entity_manager Bravo3\Orm\Services\EntityManager
$full_size integer
$id_list string[]
$iterator ArrayIterator
$query Bravo3\Orm\Query\QueryInterface
$use_cache boolean

Открытые методы

Метод Описание
__construct ( EntityManager $entity_manager, Bravo3\Orm\Query\QueryInterface $query, array $results, $full_size = null, $use_cache = true )
count ( ) : integer Result set size
current ( ) : object Return the current entity
getEntityById ( string $id ) : object | null Return an entity from the results by its ID
getFullSize ( ) : integer Get the full size of the query, without any limits applied to it
getIdList ( ) : string[] Get the full list of IDs returned in the query
getQuery ( ) : Bravo3\Orm\Query\QueryInterface Get the search query
key ( ) : mixed Get the key of the current element
next ( ) Move forward to the next entity
offsetExists ( integer $offset ) : boolean Check if an ID is in the result set
offsetGet ( integer $offset ) : object Retrieve the entity at position $offset
offsetSet ( integer $offset, mixed $value ) You cannot set query elements, calling this function will throw a \LogicException
offsetUnset ( integer $offset ) You cannot unset query elements, calling this function will throw a \LogicException
rewind ( ) Rewind the Iterator to the first element
valid ( ) : boolean Checks if current position is valid

Приватные методы

Метод Описание
hydrateEntity ( string $id ) Hydrate an entity

Описание методов

__construct() публичный Метод

public __construct ( EntityManager $entity_manager, Bravo3\Orm\Query\QueryInterface $query, array $results, $full_size = null, $use_cache = true )
$entity_manager Bravo3\Orm\Services\EntityManager
$query Bravo3\Orm\Query\QueryInterface
$results array

count() публичный Метод

Result set size
public count ( ) : integer
Результат integer

current() публичный Метод

Return the current entity
public current ( ) : object
Результат object

getEntityById() публичный Метод

Return an entity from the results by its ID
public getEntityById ( string $id ) : object | null
$id string
Результат object | null

getFullSize() публичный Метод

This information may not be available, and should be explicitly requested when creating the query.
public getFullSize ( ) : integer
Результат integer

getIdList() публичный Метод

Get the full list of IDs returned in the query
public getIdList ( ) : string[]
Результат string[]

getQuery() публичный Метод

Get the search query
public getQuery ( ) : Bravo3\Orm\Query\QueryInterface
Результат Bravo3\Orm\Query\QueryInterface

key() публичный Метод

Get the key of the current element
public key ( ) : mixed
Результат mixed scalar on success, or null on failure.

next() публичный Метод

Move forward to the next entity
public next ( )

offsetExists() публичный Метод

Check if an ID is in the result set
public offsetExists ( integer $offset ) : boolean
$offset integer
Результат boolean

offsetGet() публичный Метод

Retrieve the entity at position $offset
public offsetGet ( integer $offset ) : object
$offset integer
Результат object

offsetSet() публичный Метод

You cannot set query elements, calling this function will throw a \LogicException
public offsetSet ( integer $offset, mixed $value )
$offset integer
$value mixed

offsetUnset() публичный Метод

You cannot unset query elements, calling this function will throw a \LogicException
public offsetUnset ( integer $offset )
$offset integer

rewind() публичный Метод

Rewind the Iterator to the first element
public rewind ( )

valid() публичный Метод

Checks if current position is valid
public valid ( ) : boolean
Результат boolean Returns true on success or false on failure.

Описание свойств

$entities защищенное свойство

protected array $entities
Результат array

$entity_manager защищенное свойство

protected EntityManager,Bravo3\Orm\Services $entity_manager
Результат Bravo3\Orm\Services\EntityManager

$full_size защищенное свойство

protected int $full_size
Результат integer

$id_list защищенное свойство

protected string[] $id_list
Результат string[]

$iterator защищенное свойство

protected ArrayIterator $iterator
Результат ArrayIterator

$query защищенное свойство

protected QueryInterface,Bravo3\Orm\Query $query
Результат Bravo3\Orm\Query\QueryInterface

$use_cache защищенное свойство

protected bool $use_cache
Результат boolean