public function model(ModelEvent $event)
    {
        if (isset($this->logger)) {
            $operation = get_class($event);

            $model = $event->getModel();

            $on = get_class($model);

            $connection = $model->getQuery()->getConnection();

            $message = "LDAP ({$connection->getHost()})"
                . " - Connection: {$connection->getName()}"
                . " - Operation: {$operation}"
                . " - On: {$on}"
                . " - Distinguished Name: {$model->getDn()}";

            $this->logger->info($message);
        }
    }
public function model(ModelEvent $event)
    {
        if (isset($this->logger)) {
            $operation = get_class($event);

            $model = $event->getModel();

            $on = get_class($model);

            $connection = $model->getQuery()->getConnection();

            $message = "LDAP ({$connection->getHost()})"
                . " - Connection: {$connection->getName()}"
                . " - Operation: {$operation}"
                . " - On: {$on}"
                . " - Distinguished Name: {$model->getDn()}";

            $this->logger->info($message);
        }
    }
public function model ( ModelEvent $ event ) { if ( isset ( $ this -> logger ) ) { $ operation = get_class ( $ event ) ; $ model = $ event -> getModel ( ) ; $ on = get_class ( $ model ) ; $ connection = $ model -> getQuery ( ) -> getConnection ( ) ; $ message = "LDAP ({$connection->getHost()})" . " - Connection: {$connection->getName()}" . " - Operation: {$operation}" . " - On: {$on}" . " - Distinguished Name: {$model->getDn()}" ; $ this -> logger -> info ( $ message ) ; } }
Logs a model event.

@param ModelEvent $event

@return void
Logs a model event .