PHP Class Namshi\Notificator\Manager

Inheritance: implements Namshi\Notificator\ManagerInterface
ファイルを表示 Open project: namshi/notificator Class Usage Examples

Protected Properties

Property Type Description
$handlers array
$logger Psr\Log\LoggerInterface

Public Methods

Method Description
__construct ( array $handlers = [], Psr\Log\LoggerInterface $logger = null ) Constructor.
addHandler ( Namshi\Notificator\Notification\Handler\HandlerInterface $handler ) Adds an handler to this manager.
getHandlers ( ) : array Returns all the handlers associated to this manager.
getLogger ( ) : Psr\Log\LoggerInterface
trigger ( Namshi\Notificator\NotificationInterface $notification )

Method Details

__construct() public method

Constructor.
public __construct ( array $handlers = [], Psr\Log\LoggerInterface $logger = null )
$handlers array
$logger Psr\Log\LoggerInterface

addHandler() public method

Adds an handler to this manager.
public addHandler ( Namshi\Notificator\Notification\Handler\HandlerInterface $handler )
$handler Namshi\Notificator\Notification\Handler\HandlerInterface

getHandlers() public method

Returns all the handlers associated to this manager.
public getHandlers ( ) : array
return array

getLogger() public method

public getLogger ( ) : Psr\Log\LoggerInterface
return Psr\Log\LoggerInterface

trigger() public method

public trigger ( Namshi\Notificator\NotificationInterface $notification )
$notification Namshi\Notificator\NotificationInterface

Property Details

$handlers protected_oe property

protected array $handlers
return array

$logger protected_oe property

protected LoggerInterface,Psr\Log $logger
return Psr\Log\LoggerInterface