PHP Class Newscoop\Doctrine\EventDispatcherProxy

Inheritance: implements Doctrine\Common\EventSubscriber
ファイルを表示 Open project: sourcefabric/newscoop Class Usage Examples

Protected Properties

Property Type Description
$dispatcher
$events array

Public Methods

Method Description
__construct ( $dispatcher )
getSubscribedEvents ( ) : array Get subscribed doctrine orm events.
postPersist ( Doctrine\ORM\Event\LifecycleEventArgs $args ) : void Dispatch entity.create on postPersist.
postUpdate ( Doctrine\ORM\Event\LifecycleEventArgs $args ) : void Dispatch entity.update on postUpdate.
preRemove ( Doctrine\ORM\Event\LifecycleEventArgs $args ) : void Dispatch entity.delete on preRemove.
preUpdate ( Doctrine\ORM\Event\PreUpdateEventArgs $args ) : void Dispatch entity.update on preUpdate.

Private Methods

Method Description
getEntityId ( object $entity, EntityManager $em ) : mixed Get entity id.
getEntityName ( object $entity ) : string Get entity name.
getEntityProperties ( $entity, EntityManager $em ) : array Get entity properties.
getEntityTitle ( object $entity ) : string Get entity title.

Method Details

__construct() public method

public __construct ( $dispatcher )
$dispatcher

getSubscribedEvents() public method

Get subscribed doctrine orm events.
public getSubscribedEvents ( ) : array
return array

postPersist() public method

Dispatch entity.create on postPersist.
public postPersist ( Doctrine\ORM\Event\LifecycleEventArgs $args ) : void
$args Doctrine\ORM\Event\LifecycleEventArgs
return void

postUpdate() public method

Dispatch entity.update on postUpdate.
public postUpdate ( Doctrine\ORM\Event\LifecycleEventArgs $args ) : void
$args Doctrine\ORM\Event\LifecycleEventArgs
return void

preRemove() public method

Dispatch entity.delete on preRemove.
public preRemove ( Doctrine\ORM\Event\LifecycleEventArgs $args ) : void
$args Doctrine\ORM\Event\LifecycleEventArgs
return void

preUpdate() public method

Dispatch entity.update on preUpdate.
public preUpdate ( Doctrine\ORM\Event\PreUpdateEventArgs $args ) : void
$args Doctrine\ORM\Event\PreUpdateEventArgs
return void

Property Details

$dispatcher protected_oe property

protected $dispatcher

$events protected_oe property

protected array $events
return array