PHP Class AMQPEnvelope

Exibir arquivo Open project: pdezwart/php-amqp Class Usage Examples

Public Methods

Method Description
__construct ( )
getBody ( ) : string Get the body of the message.
getDeliveryTag ( ) : string Get the delivery tag of the message.
getExchangeName ( ) : string Get the exchange name on which the message was published.
getHeader ( string $header_key ) : string | boolean Get a specific message header.
getRoutingKey ( ) : string Get the routing key of the message.
hasHeader ( string $header_key ) : boolean Check whether specific message header exists.
isRedelivery ( ) : boolean Whether this is a redelivery of the message.

Method Details

__construct() public method

public __construct ( )

getBody() public method

Get the body of the message.
public getBody ( ) : string
return string The contents of the message body.

getDeliveryTag() public method

Get the delivery tag of the message.
public getDeliveryTag ( ) : string
return string The delivery tag of the message.

getExchangeName() public method

Get the exchange name on which the message was published.
public getExchangeName ( ) : string
return string The exchange name on which the message was published.

getHeader() public method

Get a specific message header.
public getHeader ( string $header_key ) : string | boolean
$header_key string Name of the header to get the value from.
return string | boolean The contents of the specified header or FALSE if not set.

getRoutingKey() public method

Get the routing key of the message.
public getRoutingKey ( ) : string
return string The message routing key.

hasHeader() public method

Check whether specific message header exists.
public hasHeader ( string $header_key ) : boolean
$header_key string Name of the header to check.
return boolean

isRedelivery() public method

Whether this is a redelivery of a message. If this message has been delivered and AMQPEnvelope::nack() was called, the message will be put back on the queue to be redelivered, at which point the message will always return TRUE when this method is called.
public isRedelivery ( ) : boolean
return boolean TRUE if this is a redelivery, FALSE otherwise.