PHP Class Nextras\Orm\Repository\Repository

Inheritance: extends Nette\Object, implements Nextras\Orm\Repository\IRepository
Show file Open project: nextras/orm Class Usage Examples

Public Properties

Property Type Description
$onAfterInsert of callbacks with (IEntity $entity) arguments
$onAfterPersist of callbacks with (IEntity $entity) arguments
$onAfterRemove of callbacks with (IEntity $entity) arguments
$onAfterUpdate of callbacks with (IEntity $entity) arguments
$onBeforeInsert of callbacks with (IEntity $entity) arguments
$onBeforePersist of callbacks with (IEntity $entity) arguments
$onBeforeRemove of callbacks with (IEntity $entity) arguments
$onBeforeUpdate of callbacks with (IEntity $entity) arguments
$onFlush of callbacks with (IEntity[] $persisted, IEntity[] $removed) arguments

Protected Properties

Property Type Description
$entityClassName string
$mapper Nextras\Orm\Mapper\IMapper

Public Methods

Method Description
__call ( $method, $args )
__construct ( Nextras\Orm\Mapper\IMapper $mapper, Nextras\Orm\Repository\IDependencyProvider $dependencyProvider = null )
attach ( Nextras\Orm\Entity\IEntity $entity )
detach ( Nextras\Orm\Entity\IEntity $entity )
doClearIdentityMap ( $areYouSure = null )
doFireEvent ( Nextras\Orm\Entity\IEntity $entity, $event )
doFlush ( )
doPersist ( Nextras\Orm\Entity\IEntity $entity )
doRemove ( Nextras\Orm\Entity\IEntity $entity )
findAll ( )
findBy ( array $conds )
findById ( $ids )
flush ( )
getBy ( array $conds )
getById ( $id )
getEntityClassName ( array $data )
getEntityMetadata ( )
getMapper ( )
getModel ( $need = true )
hydrateEntity ( array $data )
persist ( Nextras\Orm\Entity\IEntity $entity, $withCascade = true )
persistAndFlush ( Nextras\Orm\Entity\IEntity $entity, $withCascade = true )
remove ( $entity, $withCascade = true )
removeAndFlush ( $entity, $withCascade = true )
setModel ( Nextras\Orm\Model\IModel $model )

Method Details

__call() public method

public __call ( $method, $args )

__construct() public method

public __construct ( Nextras\Orm\Mapper\IMapper $mapper, Nextras\Orm\Repository\IDependencyProvider $dependencyProvider = null )
$mapper Nextras\Orm\Mapper\IMapper
$dependencyProvider Nextras\Orm\Repository\IDependencyProvider

attach() public method

public attach ( Nextras\Orm\Entity\IEntity $entity )
$entity Nextras\Orm\Entity\IEntity

detach() public method

public detach ( Nextras\Orm\Entity\IEntity $entity )
$entity Nextras\Orm\Entity\IEntity

doClearIdentityMap() public method

public doClearIdentityMap ( $areYouSure = null )

doFireEvent() public method

public doFireEvent ( Nextras\Orm\Entity\IEntity $entity, $event )
$entity Nextras\Orm\Entity\IEntity

doFlush() public method

public doFlush ( )

doPersist() public method

public doPersist ( Nextras\Orm\Entity\IEntity $entity )
$entity Nextras\Orm\Entity\IEntity

doRemove() public method

public doRemove ( Nextras\Orm\Entity\IEntity $entity )
$entity Nextras\Orm\Entity\IEntity

findAll() public method

public findAll ( )

findBy() public method

public findBy ( array $conds )
$conds array

findById() public method

public findById ( $ids )

flush() public method

public flush ( )

getBy() public method

public getBy ( array $conds )
$conds array

getById() public method

public getById ( $id )

getEntityClassName() public method

public getEntityClassName ( array $data )
$data array

getEntityMetadata() public method

public getEntityMetadata ( )

getMapper() public method

public getMapper ( )

getModel() public method

public getModel ( $need = true )

hydrateEntity() public method

public hydrateEntity ( array $data )
$data array

persist() public method

public persist ( Nextras\Orm\Entity\IEntity $entity, $withCascade = true )
$entity Nextras\Orm\Entity\IEntity

persistAndFlush() public method

public persistAndFlush ( Nextras\Orm\Entity\IEntity $entity, $withCascade = true )
$entity Nextras\Orm\Entity\IEntity

remove() public method

public remove ( $entity, $withCascade = true )

removeAndFlush() public method

public removeAndFlush ( $entity, $withCascade = true )

setModel() public method

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

Property Details

$entityClassName protected property

protected string $entityClassName
return string

$mapper protected property

protected IMapper,Nextras\Orm\Mapper $mapper
return Nextras\Orm\Mapper\IMapper

$onAfterInsert public property

of callbacks with (IEntity $entity) arguments
public $onAfterInsert

$onAfterPersist public property

of callbacks with (IEntity $entity) arguments
public $onAfterPersist

$onAfterRemove public property

of callbacks with (IEntity $entity) arguments
public $onAfterRemove

$onAfterUpdate public property

of callbacks with (IEntity $entity) arguments
public $onAfterUpdate

$onBeforeInsert public property

of callbacks with (IEntity $entity) arguments
public $onBeforeInsert

$onBeforePersist public property

of callbacks with (IEntity $entity) arguments
public $onBeforePersist

$onBeforeRemove public property

of callbacks with (IEntity $entity) arguments
public $onBeforeRemove

$onBeforeUpdate public property

of callbacks with (IEntity $entity) arguments
public $onBeforeUpdate

$onFlush public property

of callbacks with (IEntity[] $persisted, IEntity[] $removed) arguments
public $onFlush