PHP Интерфейс Nextras\Orm\Repository\IRepository

Показать файл Открыть проект Примеры использования интерфейса

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

Метод Описание
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