PHP 인터페이스 Nextras\Orm\Collection\ICollection

상속: extends IteratorAggregat\IteratorAggregate, extends Countabl\Countable
파일 보기 프로젝트 열기: nextras/orm 0 사용 예제들

공개 메소드들

메소드 설명
countStored ( ) : integer Counts collection entities without fetching them from storage.
fetch ( ) : Nextras\Orm\Entity\IEntity | null Fetches the first row.
fetchAll ( ) : Nextras\Orm\Entity\IEntity[] Fetches all records.
fetchPairs ( string $key = null, string $value = null ) : array Fetches all records like $key => $value pairs.
findBy ( array $where ) : Nextras\Orm\Collection\ICollection Returns entity collection filtered by conditions.
getBy ( array $where ) : Nextras\Orm\Entity\IEntity | null Returns IEntity filtered by conditions.
getEntityCount ( Nextras\Orm\Entity\IEntity $parent = null ) : integer
getEntityIterator ( Nextras\Orm\Entity\IEntity $parent = null ) : Traversable
getRelationshipMapper ( ) : Nextras\Orm\Mapper\IRelationshipMapper
limitBy ( integer $limit, integer $offset = null ) : Nextras\Orm\Collection\ICollection Limits number of rows.
orderBy ( string | array $column, string $direction = self::ASC ) : Nextras\Orm\Collection\ICollection Selects columns to order by.
resetOrderBy ( ) : Nextras\Orm\Collection\ICollection Resets collection ordering.
setRelationshipMapping ( Nextras\Orm\Mapper\IRelationshipMapper $mapper = null, Nextras\Orm\Entity\IEntity $parent = null ) : self Sets relationship mapping over collection.

메소드 상세

countStored() 공개 메소드

Counts collection entities without fetching them from storage.
public countStored ( ) : integer
리턴 integer

fetch() 공개 메소드

Fetches the first row.
public fetch ( ) : Nextras\Orm\Entity\IEntity | null
리턴 Nextras\Orm\Entity\IEntity | null

fetchAll() 공개 메소드

Fetches all records.
public fetchAll ( ) : Nextras\Orm\Entity\IEntity[]
리턴 Nextras\Orm\Entity\IEntity[]

fetchPairs() 공개 메소드

Fetches all records like $key => $value pairs.
public fetchPairs ( string $key = null, string $value = null ) : array
$key string associative key
$value string value
리턴 array

findBy() 공개 메소드

Returns new instance of collection.
public findBy ( array $where ) : Nextras\Orm\Collection\ICollection
$where array
리턴 Nextras\Orm\Collection\ICollection

getBy() 공개 메소드

Returns IEntity filtered by conditions.
public getBy ( array $where ) : Nextras\Orm\Entity\IEntity | null
$where array
리턴 Nextras\Orm\Entity\IEntity | null

getEntityCount() 공개 메소드

public getEntityCount ( Nextras\Orm\Entity\IEntity $parent = null ) : integer
$parent Nextras\Orm\Entity\IEntity
리턴 integer

getEntityIterator() 공개 메소드

public getEntityIterator ( Nextras\Orm\Entity\IEntity $parent = null ) : Traversable
$parent Nextras\Orm\Entity\IEntity
리턴 Traversable

getRelationshipMapper() 공개 메소드

public getRelationshipMapper ( ) : Nextras\Orm\Mapper\IRelationshipMapper
리턴 Nextras\Orm\Mapper\IRelationshipMapper

limitBy() 공개 메소드

Limits number of rows.
public limitBy ( integer $limit, integer $offset = null ) : Nextras\Orm\Collection\ICollection
$limit integer
$offset integer
리턴 Nextras\Orm\Collection\ICollection

orderBy() 공개 메소드

Returns new instance of collection.
public orderBy ( string | array $column, string $direction = self::ASC ) : Nextras\Orm\Collection\ICollection
$column string | array column name or array of column names
$direction string sorting direction self::ASC or self::DESC
리턴 Nextras\Orm\Collection\ICollection

resetOrderBy() 공개 메소드

Resets collection ordering.
public resetOrderBy ( ) : Nextras\Orm\Collection\ICollection
리턴 Nextras\Orm\Collection\ICollection

setRelationshipMapping() 공개 메소드

Sets relationship mapping over collection.
public setRelationshipMapping ( Nextras\Orm\Mapper\IRelationshipMapper $mapper = null, Nextras\Orm\Entity\IEntity $parent = null ) : self
$mapper Nextras\Orm\Mapper\IRelationshipMapper
$parent Nextras\Orm\Entity\IEntity
리턴 self