PHP 인터페이스 Nextras\Orm\Repository\IRepository

파일 보기 프로젝트 열기: nextras/orm 0 사용 예제들

공개 메소드들

메소드 설명
attach ( Nextras\Orm\Entity\IEntity $entity ) Attaches entity to repository.
detach ( Nextras\Orm\Entity\IEntity $entity ) Detaches entity from repository.
doClearIdentityMap ( $areYouSure ) DO NOT CALL THIS METHOD DIRECTLY.
doFireEvent ( Nextras\Orm\Entity\IEntity $entity, string $event ) : void DO NOT CALL THIS METHOD DIRECTLY.
doFlush ( ) : [IEntity[], DO NOT CALL THIS METHOD DIRECTLY.
doPersist ( Nextras\Orm\Entity\IEntity $entity ) DO NOT CALL THIS METHOD DIRECTLY.
doRemove ( Nextras\Orm\Entity\IEntity $entity ) DO NOT CALL THIS METHOD DIRECTLY.
findAll ( ) : Nextras\Orm\Collection\ICollection Returns entity collection with all entities.
findBy ( array $where ) : Nextras\Orm\Collection\ICollection Returns entity collection filtered by conditions.
findById ( mixed[] $primaryValues ) : Nextras\Orm\Collection\ICollection Returns entities by primary values.
flush ( ) Flushes all persisted changes in all repositories.
getBy ( array $conds ) : Nextras\Orm\Entity\IEntity | null Returns IEntity filtered by conditions
getById ( mixed $primaryValue ) : Nextras\Orm\Entity\IEntity Returns entity by primary value.
getEntityClassName ( array $data ) : string Returns entity class name.
getEntityClassNames ( ) : string[] Returns possible entity class names for current repository.
getEntityMetadata ( ) : EntityMetadata Returns entity metadata.
getMapper ( ) : Nextras\Orm\Mapper\IMapper
getModel ( boolean $need = true ) : Nextras\Orm\Model\IModel
hydrateEntity ( array $data ) : Nextras\Orm\Entity\IEntity Hydrates entity.
persist ( Nextras\Orm\Entity\IEntity $entity, boolean $withCascade = true ) : mixed
persistAndFlush ( Nextras\Orm\Entity\IEntity $entity, boolean $withCascade = true ) : mixed
remove ( Nextras\Orm\Entity\IEntity | mixed $entity, boolean $withCascade = true ) : Nextras\Orm\Entity\IEntity
removeAndFlush ( Nextras\Orm\Entity\IEntity | mixed $entity, boolean $withCascade = true ) : Nextras\Orm\Entity\IEntity
setModel ( Nextras\Orm\Model\IModel $model )

메소드 상세

attach() 공개 메소드

Attaches entity to repository.
public attach ( Nextras\Orm\Entity\IEntity $entity )
$entity Nextras\Orm\Entity\IEntity

detach() 공개 메소드

Detaches entity from repository.
public detach ( Nextras\Orm\Entity\IEntity $entity )
$entity Nextras\Orm\Entity\IEntity

doClearIdentityMap() 공개 메소드

DO NOT CALL THIS METHOD DIRECTLY.
public doClearIdentityMap ( $areYouSure )

doFireEvent() 공개 메소드

Fires the event on the entity.
public doFireEvent ( Nextras\Orm\Entity\IEntity $entity, string $event ) : void
$entity Nextras\Orm\Entity\IEntity
$event string
리턴 void

doFlush() 공개 메소드

DO NOT CALL THIS METHOD DIRECTLY.
public doFlush ( ) : [IEntity[],
리턴 [IEntity[],

doPersist() 공개 메소드

DO NOT CALL THIS METHOD DIRECTLY.
public doPersist ( Nextras\Orm\Entity\IEntity $entity )
$entity Nextras\Orm\Entity\IEntity

doRemove() 공개 메소드

DO NOT CALL THIS METHOD DIRECTLY.
public doRemove ( Nextras\Orm\Entity\IEntity $entity )
$entity Nextras\Orm\Entity\IEntity

findAll() 공개 메소드

Returns entity collection with all entities.
public findAll ( ) : Nextras\Orm\Collection\ICollection
리턴 Nextras\Orm\Collection\ICollection

findBy() 공개 메소드

Returns entity collection filtered by conditions.
public findBy ( array $where ) : Nextras\Orm\Collection\ICollection
$where array
리턴 Nextras\Orm\Collection\ICollection

findById() 공개 메소드

Returns entities by primary values.
public findById ( mixed[] $primaryValues ) : Nextras\Orm\Collection\ICollection
$primaryValues mixed[]
리턴 Nextras\Orm\Collection\ICollection

flush() 공개 메소드

Flushes all persisted changes in all repositories.
public flush ( )

getBy() 공개 메소드

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

getById() 공개 메소드

Returns entity by primary value.
public getById ( mixed $primaryValue ) : Nextras\Orm\Entity\IEntity
$primaryValue mixed
리턴 Nextras\Orm\Entity\IEntity

getEntityClassName() 공개 메소드

Returns entity class name.
public getEntityClassName ( array $data ) : string
$data array
리턴 string

getEntityClassNames() 공개 정적인 메소드

Returns possible entity class names for current repository.
public static getEntityClassNames ( ) : string[]
리턴 string[]

getEntityMetadata() 공개 메소드

Returns entity metadata.
public getEntityMetadata ( ) : EntityMetadata
리턴 Nextras\Orm\Entity\Reflection\EntityMetadata

getMapper() 공개 메소드

public getMapper ( ) : Nextras\Orm\Mapper\IMapper
리턴 Nextras\Orm\Mapper\IMapper

getModel() 공개 메소드

public getModel ( boolean $need = true ) : Nextras\Orm\Model\IModel
$need boolean
리턴 Nextras\Orm\Model\IModel

hydrateEntity() 공개 메소드

Hydrates entity.
public hydrateEntity ( array $data ) : Nextras\Orm\Entity\IEntity
$data array
리턴 Nextras\Orm\Entity\IEntity

persist() 공개 메소드

public persist ( Nextras\Orm\Entity\IEntity $entity, boolean $withCascade = true ) : mixed
$entity Nextras\Orm\Entity\IEntity
$withCascade boolean
리턴 mixed

persistAndFlush() 공개 메소드

public persistAndFlush ( Nextras\Orm\Entity\IEntity $entity, boolean $withCascade = true ) : mixed
$entity Nextras\Orm\Entity\IEntity
$withCascade boolean
리턴 mixed

remove() 공개 메소드

public remove ( Nextras\Orm\Entity\IEntity | mixed $entity, boolean $withCascade = true ) : Nextras\Orm\Entity\IEntity
$entity Nextras\Orm\Entity\IEntity | mixed
$withCascade boolean
리턴 Nextras\Orm\Entity\IEntity

removeAndFlush() 공개 메소드

public removeAndFlush ( Nextras\Orm\Entity\IEntity | mixed $entity, boolean $withCascade = true ) : Nextras\Orm\Entity\IEntity
$entity Nextras\Orm\Entity\IEntity | mixed
$withCascade boolean
리턴 Nextras\Orm\Entity\IEntity

setModel() 공개 메소드

public setModel ( Nextras\Orm\Model\IModel $model )
$model Nextras\Orm\Model\IModel