PHP Interface Kraken\Channel\Router\RouterCompositeInterface

Inheritance: extends RouterInterface
Show file Open project: kraken-php/framework Interface Usage Examples

Public Methods

Method Description
existsBus ( string $name ) : boolean Check if bus exists in router domain.
getBus ( string $name ) : RouterInterface | Kraken\Channel\Router\RouterCompositeInterface Return bus from router domain or throw exception if it does not exist.
getBuses ( ) : RouterInterface[] | Kraken\Channel\Router\RouterCompositeInterface[] Return all buses existing in router domain.
removeBus ( string $name ) : Kraken\Channel\ChannelCompositeInterface Remove bus from router domain if it does exist.
setBus ( string $name, RouterInterface | Kraken\Channel\Router\RouterCompositeInterface $router ) : Kraken\Channel\ChannelCompositeInterface Add or replace existing bus in router domain.

Method Details

existsBus() public method

Check if bus exists in router domain.
public existsBus ( string $name ) : boolean
$name string
return boolean

getBus() public method

Throws ResourceUndefinedException if bus is not found.
public getBus ( string $name ) : RouterInterface | Kraken\Channel\Router\RouterCompositeInterface
$name string
return RouterInterface | Kraken\Channel\Router\RouterCompositeInterface

getBuses() public method

Return all buses existing in router domain.
public getBuses ( ) : RouterInterface[] | Kraken\Channel\Router\RouterCompositeInterface[]
return RouterInterface[] | Kraken\Channel\Router\RouterCompositeInterface[]

removeBus() public method

Remove bus from router domain if it does exist.
public removeBus ( string $name ) : Kraken\Channel\ChannelCompositeInterface
$name string
return Kraken\Channel\ChannelCompositeInterface

setBus() public method

Add or replace existing bus in router domain.
public setBus ( string $name, RouterInterface | Kraken\Channel\Router\RouterCompositeInterface $router ) : Kraken\Channel\ChannelCompositeInterface
$name string
$router RouterInterface | Kraken\Channel\Router\RouterCompositeInterface
return Kraken\Channel\ChannelCompositeInterface