Phalcon\Mvc\MongoCollection::fireEventCancel PHP Method

fireEventCancel() public method

Fires an internal event that cancels the operation
public fireEventCancel ( string $eventName ) : boolean
$eventName string
return boolean
    public function fireEventCancel($eventName)
    {
        /**
         * Check if there is a method with the same name of the event
         */
        if (method_exists($this, $eventName)) {
            if (false === $this->{$eventName}()) {
                return false;
            }
        }
        /**
         * Send a notification to the events manager
         */
        if (false === $this->_modelsManager->notifyEvent($eventName, $this)) {
            return false;
        }
        return true;
    }