PHP Interface Nextras\Orm\Repository\IRepository

Afficher le fichier Open project: nextras/orm Interface Usage Examples

Méthodes publiques

Méthode Description
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 )

Method Details

attach() public méthode

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

detach() public méthode

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

doClearIdentityMap() public méthode

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

doFireEvent() public méthode

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

doFlush() public méthode

DO NOT CALL THIS METHOD DIRECTLY.
public doFlush ( ) : [IEntity[],
Résultat [IEntity[],

doPersist() public méthode

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

doRemove() public méthode

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

findAll() public méthode

Returns entity collection with all entities.
public findAll ( ) : Nextras\Orm\Collection\ICollection
Résultat Nextras\Orm\Collection\ICollection

findBy() public méthode

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

findById() public méthode

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

flush() public méthode

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

getBy() public méthode

Returns IEntity filtered by conditions
public getBy ( array $conds ) : Nextras\Orm\Entity\IEntity | null
$conds array
Résultat Nextras\Orm\Entity\IEntity | null

getById() public méthode

Returns entity by primary value.
public getById ( mixed $primaryValue ) : Nextras\Orm\Entity\IEntity
$primaryValue mixed
Résultat Nextras\Orm\Entity\IEntity

getEntityClassName() public méthode

Returns entity class name.
public getEntityClassName ( array $data ) : string
$data array
Résultat string

getEntityClassNames() public static méthode

Returns possible entity class names for current repository.
public static getEntityClassNames ( ) : string[]
Résultat string[]

getEntityMetadata() public méthode

Returns entity metadata.
public getEntityMetadata ( ) : EntityMetadata
Résultat Nextras\Orm\Entity\Reflection\EntityMetadata

getMapper() public méthode

public getMapper ( ) : Nextras\Orm\Mapper\IMapper
Résultat Nextras\Orm\Mapper\IMapper

getModel() public méthode

public getModel ( boolean $need = true ) : Nextras\Orm\Model\IModel
$need boolean
Résultat Nextras\Orm\Model\IModel

hydrateEntity() public méthode

Hydrates entity.
public hydrateEntity ( array $data ) : Nextras\Orm\Entity\IEntity
$data array
Résultat Nextras\Orm\Entity\IEntity

persist() public méthode

public persist ( Nextras\Orm\Entity\IEntity $entity, boolean $withCascade = true ) : mixed
$entity Nextras\Orm\Entity\IEntity
$withCascade boolean
Résultat mixed

persistAndFlush() public méthode

public persistAndFlush ( Nextras\Orm\Entity\IEntity $entity, boolean $withCascade = true ) : mixed
$entity Nextras\Orm\Entity\IEntity
$withCascade boolean
Résultat mixed

remove() public méthode

public remove ( Nextras\Orm\Entity\IEntity | mixed $entity, boolean $withCascade = true ) : Nextras\Orm\Entity\IEntity
$entity Nextras\Orm\Entity\IEntity | mixed
$withCascade boolean
Résultat Nextras\Orm\Entity\IEntity

removeAndFlush() public méthode

public removeAndFlush ( Nextras\Orm\Entity\IEntity | mixed $entity, boolean $withCascade = true ) : Nextras\Orm\Entity\IEntity
$entity Nextras\Orm\Entity\IEntity | mixed
$withCascade boolean
Résultat Nextras\Orm\Entity\IEntity

setModel() public méthode

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