PHP Class Kraken\Channel\Router\RouterRule

Datei anzeigen Open project: kraken-php/framework Class Usage Examples

Protected Properties

Property Type Description
$cancelled boolean
$handler callable
$limit integer
$matcher callable
$pointer array | null
$propagate boolean
$router RouterInterface

Public Methods

Method Description
__construct ( RouterInterface $router, callable $matcher, callable $handler, boolean $propagate = false, integer $limit )
__destruct ( )
cancel ( ) Remove this handler.
getRouter ( ) : RouterInterface Return Router to which handler is attached to.
handle ( string $sender, Kraken\Channel\Protocol\ProtocolInterface $protocol, integer $flags, callable $success = null, callable $failure = null, callable $cancel = null, float $timeout ) : boolean Handle given message protocol.
match ( string $sender, Kraken\Channel\Protocol\ProtocolInterface $protocol ) : boolean Match given message protocol.
setPointer ( string $stack, integer $pointer )

Method Details

__construct() public method

public __construct ( RouterInterface $router, callable $matcher, callable $handler, boolean $propagate = false, integer $limit )
$router RouterInterface
$matcher callable
$handler callable
$propagate boolean
$limit integer

__destruct() public method

public __destruct ( )

cancel() public method

Remove this handler.
public cancel ( )

getRouter() public method

Return Router to which handler is attached to.
public getRouter ( ) : RouterInterface
return RouterInterface

handle() public method

Handle given message protocol.
public handle ( string $sender, Kraken\Channel\Protocol\ProtocolInterface $protocol, integer $flags, callable $success = null, callable $failure = null, callable $cancel = null, float $timeout ) : boolean
$sender string
$protocol Kraken\Channel\Protocol\ProtocolInterface
$flags integer
$success callable
$failure callable
$cancel callable
$timeout float
return boolean

match() public method

Match given message protocol.
public match ( string $sender, Kraken\Channel\Protocol\ProtocolInterface $protocol ) : boolean
$sender string
$protocol Kraken\Channel\Protocol\ProtocolInterface
return boolean

setPointer() public method

public setPointer ( string $stack, integer $pointer )
$stack string
$pointer integer

Property Details

$cancelled protected_oe property

protected bool $cancelled
return boolean

$handler protected_oe property

protected callable $handler
return callable

$limit protected_oe property

protected int $limit
return integer

$matcher protected_oe property

protected callable $matcher
return callable

$pointer protected_oe property

protected array|null $pointer
return array | null

$propagate protected_oe property

protected bool $propagate
return boolean

$router protected_oe property

protected RouterInterface $router
return RouterInterface