Phalcon\Mvc\Model\Behavior\NestedSet::notify PHP Method

notify() public method

public notify ( string $eventType, Phalcon\Mvc\ModelInterface $model )
$eventType string
$model Phalcon\Mvc\ModelInterface
    public function notify($eventType, ModelInterface $model)
    {
        switch ($eventType) {
            case 'beforeCreate':
            case 'beforeDelete':
            case 'beforeUpdate':
                if (!$this->ignoreEvent) {
                    throw new Exception(sprintf('You should not use %s:%s when %s attached. Use the methods of behavior.', get_class($model), $eventType, __CLASS__));
                }
                break;
        }
    }