public function notify(NotificationInterface $notification, $level = self::INFO)
    {
        if (!$this->handlers)
        {
            $this->addHandler(new NullHandler());
        }

        foreach ($this->getHandlers() as $handler)
        {
            if ($handler->shouldHandle($notification, $level))
            {
                if (false === $handler->handle($notification, $level))
                {
                    return false;
                }
            }
        }

        return true;
    }
public function notify(NotificationInterface $notification, $level = self::INFO)
    {
        if (!$this->handlers)
        {
            $this->addHandler(new NullHandler());
        }

        foreach ($this->getHandlers() as $handler)
        {
            if ($handler->shouldHandle($notification, $level))
            {
                if (false === $handler->handle($notification, $level))
                {
                    return false;
                }
            }
        }

        return true;
    }
public function notify ( NotificationInterface $ notification , $ level = self :: INFO ) { if ( ! $ this -> handlers ) { $ this -> addHandler ( new NullHandler ( ) ) ; } foreach ( $ this -> getHandlers ( ) as $ handler ) { if ( $ handler -> shouldHandle ( $ notification , $ level ) ) { if ( false === $ handler -> handle ( $ notification , $ level ) ) { return false ; } } } return true ; }
Handles notification for every handler

@param NotificationInterface $notification the notification instanceitself
@param int                   $level        Level of this notification

@return bool
Handles notification for every handler