Conexión AMQP
PHP Manual

AMQPConnection::__construct

(PECL amqp >= Unknown)

AMQPConnection::__constructCrear una instancia de Conexión de PCMA (AMQP)

Descripción

AMQPConnection::__construct ([ array $credentials = array() ] )

Crear una instancia de AMQPConnection representando una conexión a un corredor PCMA (AMQP).

Parámetros

credentials

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.

Valores devueltos

An AMQPConnection object.

Ejemplos

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'
));

?>


Conexión AMQP
PHP Manual