PHP Class Kraken\Channel\Extra\Response

Show file Open project: kraken-php/framework Class Usage Examples

Protected Properties

Property Type Description
$channel Kraken\Channel\ChannelInterface
$message string | string[] | Erro\Error | Exceptio\Exception
$params mixed[]
$protocol Kraken\Channel\Protocol\ProtocolInterface

Public Methods

Method Description
__construct ( Kraken\Channel\ChannelInterface $channel, Kraken\Channel\Protocol\ProtocolInterface $protocol, string | string[] | Erro\Error | Exceptio\Exception $message, mixed[] $params = [] )
__destruct ( )
__invoke ( ) : Kraken\Promise\PromiseInterface Send the prepared response.
call ( ) : Kraken\Promise\PromiseInterface Send the prepared response.

Protected Methods

Method Description
send ( Kraken\Promise\PromiseInterface $promise ) : Kraken\Promise\PromiseInterface Send the request using passed Promise.

Method Details

__construct() public method

public __construct ( Kraken\Channel\ChannelInterface $channel, Kraken\Channel\Protocol\ProtocolInterface $protocol, string | string[] | Erro\Error | Exceptio\Exception $message, mixed[] $params = [] )
$channel Kraken\Channel\ChannelInterface
$protocol Kraken\Channel\Protocol\ProtocolInterface
$message string | string[] | Erro\Error | Exceptio\Exception
$params mixed[]

__destruct() public method

public __destruct ( )

__invoke() public method

Send the prepared response.
public __invoke ( ) : Kraken\Promise\PromiseInterface
return Kraken\Promise\PromiseInterface

call() public method

Send the prepared response.
public call ( ) : Kraken\Promise\PromiseInterface
return Kraken\Promise\PromiseInterface

send() protected method

Send the request using passed Promise.
protected send ( Kraken\Promise\PromiseInterface $promise ) : Kraken\Promise\PromiseInterface
$promise Kraken\Promise\PromiseInterface
return Kraken\Promise\PromiseInterface

Property Details

$channel protected property

protected ChannelInterface,Kraken\Channel $channel
return Kraken\Channel\ChannelInterface

$message protected property

protected string|string[]|Error,Erro|Exception,Exceptio $message
return string | string[] | Erro\Error | Exceptio\Exception

$params protected property

protected mixed[] $params
return mixed[]

$protocol protected property

protected ProtocolInterface,Kraken\Channel\Protocol $protocol
return Kraken\Channel\Protocol\ProtocolInterface