Hi,
afterFetch is well implemented in collections. But there is another annoying missing feature: I really like it a lot working with behaviors. The notify method is straight forwarded. But afterFetch is not emited in behaviors. If I implement the afterFetch method directly in my collection, everything works like expected. But the afterFetch event isn't fired/captured. What did I wrong?
public function notify($type, \Phalcon\Mvc\CollectionInterface $collection)
{
if($this->mustTakeAction($type) == null) { return; }
if($type == "beforeCreate") {
$collection->created_at = date('d-m-Y H:i:s');
$collection->modified_at = date('d-m-Y H:i:s');
}
if($type == "beforeUpdate") {
$collection->modified_at = date('d-m-Y H:i:s');
}
if($type == "afterFetch") {
// Never get called
}
}