Created
September 15, 2012 20:09
-
-
Save bakura10/3729550 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Par défaut, Doctrine t'offre ces différents events : | |
// PostLoad, PostPersist, PostRemove, PostUpdate | |
// PrePersist, PreRemove, PreUpdate | |
/** | |
* @ORM\Entity | |
* @ORM\HasLifecycleCallbacks // <=== Active le mécanisme d'évènements | |
*/ | |
class Base | |
{ | |
/** | |
* @ORM\PostLoad | |
*/ | |
public function updateResources() | |
{ | |
// Du traitemement | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment