src/CRUDlex/EntityEvents.php
public function pop($moment, $action)
    {
        if (array_key_exists($moment.'.'.$action, $this->events)) {
            return array_pop($this->events[$moment.'.'.$action]);
        }
        return null;
    }
public function pop($moment, $action)
    {
        if (array_key_exists($moment.'.'.$action, $this->events)) {
            return array_pop($this->events[$moment.'.'.$action]);
        }
        return null;
    }
public function pop ( $ moment , $ action ) { if ( array_key_exists ( $ moment . '.' . $ action , $ this -> events ) ) { return array_pop ( $ this -> events [ $ moment . '.' . $ action ] ) ; } return null ; }
Removes and returns the latest event for the given parameters.

@param string $moment
the "moment" of the event, can be either "before" or "after"
@param string $action
the "action" of the event, can be either "create", "update" or "delete"

@return \Closure|null
the popped event or null if no event was available.
Removes and returns the latest event for the given parameters .