LMongo\Eloquent\Model::registerModelEvent PHP Méthode

registerModelEvent() protected static méthode

Register a model event with the dispatcher.
protected static registerModelEvent ( string $event, Closur\Closure | string $callback ) : void
$event string
$callback Closur\Closure | string
Résultat void
    protected static function registerModelEvent($event, $callback)
    {
        if (isset(static::$dispatcher)) {
            $name = get_called_class();
            static::$dispatcher->listen("lmongo.{$event}: {$name}", $callback);
        }
    }
Model