diff --git a/src/LoggerAwareInterface.php b/src/LoggerAwareInterface.php index f0c720f9..028c7f40 100644 --- a/src/LoggerAwareInterface.php +++ b/src/LoggerAwareInterface.php @@ -16,5 +16,19 @@ */ interface LoggerAwareInterface { + /** + * Set logger instance + * + * @param LoggerInterface + * @return void + */ public function setLogger(LoggerInterface $logger); + + /** + * Get logger instance. Currently commented out as this would possibly break + * existing implementations. + * + * @return null|LoggerInterface + */ + // public function getLogger(); } diff --git a/src/LoggerAwareTrait.php b/src/LoggerAwareTrait.php index 70152481..2ed7c00c 100644 --- a/src/LoggerAwareTrait.php +++ b/src/LoggerAwareTrait.php @@ -30,4 +30,14 @@ public function setLogger(LoggerInterface $logger) return $this; } + + /** + * Get logger object + * + * @return null|LoggerInterface + */ + public function getLogger() + { + return $this->logger; + } }