Clean up comments, standardize whitespace.
This commit is contained in:
@@ -20,11 +20,21 @@ abstract class Mustache_Cache_AbstractCache implements Mustache_Cache
|
||||
{
|
||||
private $logger = null;
|
||||
|
||||
/**
|
||||
* Get the current logger instance.
|
||||
*
|
||||
* @return Mustache_Logger|Psr\Log\LoggerInterface
|
||||
*/
|
||||
public function getLogger()
|
||||
{
|
||||
return $this->logger;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a logger instance.
|
||||
*
|
||||
* @param Mustache_Logger|Psr\Log\LoggerInterface $logger
|
||||
*/
|
||||
public function setLogger($logger = null)
|
||||
{
|
||||
if ($logger !== null && !($logger instanceof Mustache_Logger || is_a($logger, 'Psr\\Log\\LoggerInterface'))) {
|
||||
@@ -34,6 +44,13 @@ abstract class Mustache_Cache_AbstractCache implements Mustache_Cache
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a log record if logging is enabled.
|
||||
*
|
||||
* @param integer $level The logging level
|
||||
* @param string $message The log message
|
||||
* @param array $context The log context
|
||||
*/
|
||||
protected function log($level, $message, array $context = array())
|
||||
{
|
||||
if (isset($this->logger)) {
|
||||
|
||||
Reference in New Issue
Block a user