(PECL amqp >= Unknown)
AMQPConnection::__construct — Crear una instancia de Conexión de PCMA (AMQP)
Crear una instancia de AMQPConnection representando una conexión a un corredor PCMA (AMQP).
Las credentials es un arreglo opcional de la credencial para conectar al corredor PCMA (AMQP). Las claves usadas en The keys used in the credentials array are: host, port, vhost, login and password. All other keys will be ignored.
For each missing credential, the extension will check the ini settings or use the default value.
An AMQPConnection object.
Example #1 AMQPConnection::__construct() example
<?php
/* Create a connection using all default credentials: */
$connection1 = new AMQPConnection();
$connection2 = new AMQPConnection(array(
'host' => 'example.host',
'vhost' => '/',
'port' => 5763,
'login' => 'user',
'password' => 'password'
));
?>