Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /data/e/7/e76990b9-3372-4d88-8089-fce36e16744a/webperfection.net/sub/rady-nosu/wp-content/plugins/seo-ultimate/modules/class.su-module.php on line 1195
Doctrine 2 Events with Zend Framework 2 Entity Listener

November 18, 2014 | In: Programovanie

Doctrine 2 Events with Zend Framework 2 Entity Listener

Lifecycle of doctrine 2 events

Doctrine 2 Events with Zend Framework 2 Entity Listener

// list of events for CRUD
GET
{"file":"EquipmentEntityListener.php","line":67,"data":"postLoad"}

POST
{"file":"EquipmentEntityListener.php","line":26,"data":"prePersist"}
{"file":"EquipmentEntityListener.php","line":56,"data":"preFlush"}
{"file":"EquipmentEntityListener.php","line":31,"data":"postPersist"}
{"file":"EquipmentEntityListener.php","line":56,"data":"preFlush"}

PUT
{"file":"EquipmentEntityListener.php","line":66,"data":"postLoad"}
// in my case I call the preFlush 3 times
{"file":"EquipmentEntityListener.php","line":56,"data":"preFlush"}
{"file":"EquipmentEntityListener.php","line":56,"data":"preFlush"}
{"file":"EquipmentEntityListener.php","line":56,"data":"preFlush"}
{"file":"EquipmentEntityListener.php","line":36,"data":"preUpdate"}
{"file":"EquipmentEntityListener.php","line":41,"data":"postUpdate"}

DELETE
{"file":"EquipmentEntityListener.php","line":67,"data":"postLoad"}
{"file":"EquipmentEntityListener.php","line":17,"data":"preRemove"}
{"file":"EquipmentEntityListener.php","line":22,"data":"postRemove"}

ZF2 Listener and Doctrine 2 Entity source code:
https://github.com/kukoman/playground

Share This:

Comments are closed.