PHP Class Kraken\Channel\Router\Router

Inheritance: implements RouterInterface
Show file Open project: kraken-php/framework

Protected Properties

Property Type Description
$anchors RouterRule[]
$anchorsPointer integer
$flags integer
$rules RouterRule[]
$rulesPointer integer

Public Methods

Method Description
__construct ( integer $flags = Router::MODE_ROUTER )
__destruct ( )
addDefault ( callable $handler, $propagate = false, $limit )
addRule ( callable $matcher, callable $handler, $propagate = false, $limit )
erase ( )
handle ( $name, Kraken\Channel\Protocol\ProtocolInterface $protocol, $flags, callable $success = null, callable $failure = null, callable $cancel = null, $timeout )
removeHandler ( $stack, $pointer )

Protected Methods

Method Description
addDefaultHandler ( RouterRule $handler ) : RouterRule
addRuleHandler ( RouterRule $handler ) : RouterRule

Method Details

__construct() public method

public __construct ( integer $flags = Router::MODE_ROUTER )
$flags integer

__destruct() public method

public __destruct ( )

addDefault() public method

public addDefault ( callable $handler, $propagate = false, $limit )
$handler callable

addDefaultHandler() protected method

protected addDefaultHandler ( RouterRule $handler ) : RouterRule
$handler RouterRule
return RouterRule

addRule() public method

public addRule ( callable $matcher, callable $handler, $propagate = false, $limit )
$matcher callable
$handler callable

addRuleHandler() protected method

protected addRuleHandler ( RouterRule $handler ) : RouterRule
$handler RouterRule
return RouterRule

erase() public method

public erase ( )

handle() public method

public handle ( $name, Kraken\Channel\Protocol\ProtocolInterface $protocol, $flags, callable $success = null, callable $failure = null, callable $cancel = null, $timeout )
$protocol Kraken\Channel\Protocol\ProtocolInterface
$success callable
$failure callable
$cancel callable

removeHandler() public method

public removeHandler ( $stack, $pointer )
$stack
$pointer

Property Details

$anchors protected property

protected RouterRule[],Kraken\Channel\Router $anchors
return RouterRule[]

$anchorsPointer protected property

protected int $anchorsPointer
return integer

$flags protected property

protected int $flags
return integer

$rules protected property

protected RouterRule[],Kraken\Channel\Router $rules
return RouterRule[]

$rulesPointer protected property

protected int $rulesPointer
return integer