AMQPConnection
PHP Manual

AMQPConnection::setLogin

(No version information available, might only be in SVN)

AMQPConnection::setLoginSet the login.

Описание

public bool AMQPConnection::setLogin ( string $login )

This method will set the login string used to connect to the AMQP broker.

Список параметров

login

The login string used to authenticate with the AMQP broker.

Возвращаемые значения

Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.

Ошибки

Throws an AMQPConnectionException if login is longer then 32characters.

Примеры

Пример #1 AMQPConnection::setLogin() example

<?php

/* Create a new connection */
$cnn = new AMQPConnection();

// set the login
$cnn->setLogin('myusername');

?>


AMQPConnection
PHP Manual