AMQPExchange::setName PHP Метод

setName() публичный Метод

Set the name of the exchange.
public setName ( string $exchange_name ) : void
$exchange_name string The name of the exchange to set as string.
Результат void
    public function setName($exchange_name)
    {
    }

Usage Example

Пример #1
0
 /**
  * @param string $protocol
  * @param string $encoding
  * @param bool   $synchronous
  * @param array  $endpoint
  */
 public function __construct($protocol, $encoding, $synchronous = false, array $endpoint = [])
 {
     parent::__construct($protocol, $encoding, $synchronous, $endpoint);
     list($exchangeName, $routingKey) = array_values($this->endpoint);
     $credentials = array_filter($this->endpoint);
     $this->connection = new \AMQPConnection($credentials);
     $this->connection->connect();
     $this->channel = new \AMQPChannel($this->connection);
     $this->exchange = new \AMQPExchange($this->channel);
     $this->exchange->setName($exchangeName);
 }
All Usage Examples Of AMQPExchange::setName