class Connection

An AMQP connection.

Constants

ARGUMENTS_AS_INTEGER

Methods

__construct(array $connectionCredentials, array $exchangeConfiguration, array $queueConfiguration, AmqpFactory $amqpFactory = null)

No description

static Connection
fromDsn(string $dsn, array $options = [], AmqpFactory $amqpFactory = null)

No description

void
publish(string $body, array $headers = [])

No description

AMQPEnvelope|null
get()

Waits and gets a message from the configured queue.

bool
ack(AMQPEnvelope $message)

No description

bool
reject(AMQPEnvelope $message)

No description

bool
nack(AMQPEnvelope $message, int $flags = AMQP_NOPARAM)

No description

void
setup()

No description

AMQPChannel
channel()

No description

AMQPQueue
queue()

No description

AMQPExchange
exchange()

No description

array
getConnectionCredentials()

No description

Details

at line 56
__construct(array $connectionCredentials, array $exchangeConfiguration, array $queueConfiguration, AmqpFactory $amqpFactory = null)

Parameters

array $connectionCredentials
array $exchangeConfiguration
array $queueConfiguration
AmqpFactory $amqpFactory

at line 64
static Connection fromDsn(string $dsn, array $options = [], AmqpFactory $amqpFactory = null)

Parameters

string $dsn
array $options
AmqpFactory $amqpFactory

Return Value

Connection

at line 128
void publish(string $body, array $headers = [])

Parameters

string $body
array $headers

Return Value

void

Exceptions

AMQPException

at line 145
AMQPEnvelope|null get()

Waits and gets a message from the configured queue.

Return Value

AMQPEnvelope|null

Exceptions

AMQPException

at line 169
bool ack(AMQPEnvelope $message)

Parameters

AMQPEnvelope $message

Return Value

bool

at line 174
bool reject(AMQPEnvelope $message)

Parameters

AMQPEnvelope $message

Return Value

bool

at line 179
bool nack(AMQPEnvelope $message, int $flags = AMQP_NOPARAM)

Parameters

AMQPEnvelope $message
int $flags

Return Value

bool

at line 184
void setup()

Return Value

void

at line 196
AMQPChannel channel()

Return Value

AMQPChannel

at line 216
AMQPQueue queue()

Return Value

AMQPQueue

at line 231
AMQPExchange exchange()

Return Value

AMQPExchange

at line 247
array getConnectionCredentials()

Return Value

array