public function setLogger($logger = null)
    {
        if ($logger !== null && !($logger instanceof Mustache_Logger || is_a($logger, 'Psr\\Log\\LoggerInterface'))) {
            throw new Mustache_Exception_InvalidArgumentException('Expected an instance of Mustache_Logger or Psr\\Log\\LoggerInterface.');
        }

        if ($this->getCache()->getLogger() === null) {
            $this->getCache()->setLogger($logger);
        }

        $this->logger = $logger;
    }
public function setLogger($logger = null)
    {
        if ($logger !== null && !($logger instanceof Mustache_Logger || is_a($logger, 'Psr\\Log\\LoggerInterface'))) {
            throw new Mustache_Exception_InvalidArgumentException('Expected an instance of Mustache_Logger or Psr\\Log\\LoggerInterface.');
        }

        if ($this->getCache()->getLogger() === null) {
            $this->getCache()->setLogger($logger);
        }

        $this->logger = $logger;
    }
public function setLogger ( $ logger = null ) { if ( $ logger !== null && ! ( $ logger instanceof Mustache_Logger || is_a ( $ logger , 'Psr\\Log\\LoggerInterface' ) ) ) { throw new Mustache_Exception_InvalidArgumentException ( 'Expected an instance of Mustache_Logger or Psr\\Log\\LoggerInterface.' ) ; } if ( $ this -> getCache ( ) -> getLogger ( ) === null ) { $ this -> getCache ( ) -> setLogger ( $ logger ) ; } $ this -> logger = $ logger ; }
Set the Mustache Logger instance.

@throws Mustache_Exception_InvalidArgumentException If logger is not an instance of Mustache_Logger or Psr\Log\LoggerInterface

@param Mustache_Logger|Psr\Log\LoggerInterface $logger
Set the Mustache Logger instance .