PHP 클래스 Bravo3\Orm\Query\QueryResult

상속: implements Countable, implements Iterator, implements ArrayAccess
파일 보기 프로젝트 열기: bravo3/orm

보호된 프로퍼티들

프로퍼티 타입 설명
$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