logger = new NullLogger(); } /** * @param string $channel * @param array $event Event data map * @return bool Success */ final public function notify( $channel, $event ) { return $this->doNotify( $channel, [ $event ] ); } /** * @param string $channel * @param array $events List of event data maps * @return bool Success */ final public function notifyMulti( $channel, $events ) { return $this->doNotify( $channel, $events ); } public function setLogger( LoggerInterface $logger ) { $this->logger = $logger; } /** * @param string $channel * @param array $events List of event data maps * @return bool Success */ abstract protected function doNotify( $channel, array $events ); }