PHP Interface Kraken\Channel\Protocol\ProtocolInterface

显示文件 Open project: kraken-php/framework Interface Usage Examples

Public Methods

Method Description
getAll ( ) : mixed[] Get all fields of protocol in form of an array.
getDestination ( ) : string Return protocol destination.
getException ( ) : string Return protocol exception.
getMessage ( ) : string Return protocol message.
getOrigin ( ) : string Return protocol origin.
getPid ( ) : string Return protocol ID.
getTimestamp ( ) : integer Return protocol timestamp.
getType ( ) : string Return protocol type.
setAll ( mixed[] $args = [], boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface Set all fields of protocol simultaneously.
setDestination ( string $destination, boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface Set destination of protocol.
setException ( string $exception, boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface Set exception of protocol.
setMessage ( string $message, boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface Set message of protocol.
setOrigin ( string $origin, boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface Set origin of protocol.
setPid ( string $pid, boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface Set ID of protocol.
setTimestamp ( integer $timestamp, boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface Set timestamp of protocol.
setType ( string $type, boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface Set type of protocol.

Method Details

getAll() public method

Get all fields of protocol in form of an array.
public getAll ( ) : mixed[]
return mixed[]

getDestination() public method

Return protocol destination.
public getDestination ( ) : string
return string

getException() public method

Return protocol exception.
public getException ( ) : string
return string

getMessage() public method

Return protocol message.
public getMessage ( ) : string
return string

getOrigin() public method

Return protocol origin.
public getOrigin ( ) : string
return string

getPid() public method

Return protocol ID.
public getPid ( ) : string
return string

getTimestamp() public method

Return protocol timestamp.
public getTimestamp ( ) : integer
return integer

getType() public method

Return protocol type.
public getType ( ) : string
return string

setAll() public method

Set all fields of protocol simultaneously.
public setAll ( mixed[] $args = [], boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface
$args mixed[]
$reassign boolean
return Kraken\Channel\Protocol\ProtocolInterface

setDestination() public method

This method sets destination only if it was not set already. To force replacement $reassing flag needs to be set to true.
public setDestination ( string $destination, boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface
$destination string
$reassign boolean
return Kraken\Channel\Protocol\ProtocolInterface

setException() public method

This method sets exception only if it was not set already. To force replacement $reassing flag needs to be set to true.
public setException ( string $exception, boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface
$exception string
$reassign boolean
return Kraken\Channel\Protocol\ProtocolInterface

setMessage() public method

This method sets message only if it was not set already. To force replacement $reassing flag needs to be set to true.
public setMessage ( string $message, boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface
$message string
$reassign boolean
return Kraken\Channel\Protocol\ProtocolInterface

setOrigin() public method

This method sets origin only if it was not set already. To force replacement $reassing flag needs to be set to true.
public setOrigin ( string $origin, boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface
$origin string
$reassign boolean
return Kraken\Channel\Protocol\ProtocolInterface

setPid() public method

This method sets ID only if it was not set already. To force replacement $reassing flag needs to be set to true.
public setPid ( string $pid, boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface
$pid string
$reassign boolean
return Kraken\Channel\Protocol\ProtocolInterface

setTimestamp() public method

This method sets timestamp only if it was not set already. To force replacement $reassing flag needs to be set to true.
public setTimestamp ( integer $timestamp, boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface
$timestamp integer
$reassign boolean
return Kraken\Channel\Protocol\ProtocolInterface

setType() public method

This method sets type only if it was not set already. To force replacement $reassing flag needs to be set to true.
public setType ( string $type, boolean $reassign = false ) : Kraken\Channel\Protocol\ProtocolInterface
$type string
$reassign boolean
return Kraken\Channel\Protocol\ProtocolInterface