AMQPConnection::setPassword

(PECL amqp >= Unknown)

AMQPConnection::setPasswordSet the password.

Beskrivelse

public bool AMQPConnection::setPassword ( string $password )

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

Parametre

password

The password string used to authenticate with the AMQP broker.

Returnerings Værdier

Returns TRUE on success or FALSE on failure.

Fejl/Undtagelser

Throws an AMQPConnectionException if password is longer then 32characters.

Eksempler

Eksempel #1 AMQPConnection::setPassword() example

<?php

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

// set the password
$cnn->setPassword('mypassword');

?>

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top