controller/behavior/loggable.php
public function attachLogger($logger, $config = array())
    {
        $identifier = $this->getIdentifier($logger);

        if (!$this->__queue->hasIdentifier($identifier))
        {
            $logger = $this->getObject($identifier, $config);

            if (!($logger instanceof ComActivitiesActivityLoggerInterface))
            {
                throw new UnexpectedValueException(
                    "Logger $identifier does not implement ComActivitiesActivityLoggerInterface"
                );
            }

            $this->__queue->enqueue($logger, self::PRIORITY_NORMAL);
        }

        return $this;
    }
public function attachLogger($logger, $config = array())
    {
        $identifier = $this->getIdentifier($logger);

        if (!$this->__queue->hasIdentifier($identifier))
        {
            $logger = $this->getObject($identifier, $config);

            if (!($logger instanceof ComActivitiesActivityLoggerInterface))
            {
                throw new UnexpectedValueException(
                    "Logger $identifier does not implement ComActivitiesActivityLoggerInterface"
                );
            }

            $this->__queue->enqueue($logger, self::PRIORITY_NORMAL);
        }

        return $this;
    }
public function attachLogger ( $ logger , $ config = array ( ) ) { $ identifier = $ this -> getIdentifier ( $ logger ) ; if ( ! $ this -> __queue -> hasIdentifier ( $ identifier ) ) { $ logger = $ this -> getObject ( $ identifier , $ config ) ; if ( ! ( $ logger instanceof ComActivitiesActivityLoggerInterface ) ) { throw new UnexpectedValueException ( "Logger $identifier does not implement ComActivitiesActivityLoggerInterface" ) ; } $ this -> __queue -> enqueue ( $ logger , self :: PRIORITY_NORMAL ) ; } return $ this ; }
Attach a logger.

@param mixed $logger An object that implements ObjectInterface, ObjectIdentifier object or valid identifier
string.
@param array $config An optional associative array of configuration settings.
@throws UnexpectedValueException if the logger does not implement ComActivitiesActivityLoggerInterface.
@return ComActivitiesControllerBehaviorLoggable
Attach a logger .