Remove "@author Aaron Schulz" annotations
[lhc/web/wiklou.git] / includes / libs / eventrelayer / EventRelayer.php
index b61cae7..0cc9b3d 100644 (file)
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @author Aaron Schulz
  */
+use Psr\Log\LoggerInterface;
+use Psr\Log\LoggerAwareInterface;
+use Psr\Log\NullLogger;
 
 /**
  * Base class for reliable event relays
  */
-abstract class EventRelayer {
+abstract class EventRelayer implements LoggerAwareInterface {
+       /** @var LoggerInterface */
+       protected $logger;
+
        /**
         * @param array $params
         */
        public function __construct( array $params ) {
+               $this->logger = new NullLogger();
        }
 
        /**
@@ -47,6 +53,10 @@ abstract class EventRelayer {
                return $this->doNotify( $channel, $events );
        }
 
+       public function setLogger( LoggerInterface $logger ) {
+               $this->logger = $logger;
+       }
+
        /**
         * @param string $channel
         * @param array $events List of event data maps
@@ -54,4 +64,3 @@ abstract class EventRelayer {
         */
        abstract protected function doNotify( $channel, array $events );
 }
-