本文整理汇总了PHP中Channel::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Channel::__construct方法的具体用法?PHP Channel::__construct怎么用?PHP Channel::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Channel
的用法示例。
在下文中一共展示了Channel::__construct方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($connection, $queue_name = null, $prefetchCount = null, $args = null)
{
parent::__construct($connection, $prefetchCount);
$this->queue = new \AMQPQueue($this->channel);
if (!empty($queue_name)) {
$this->queue->setName($queue_name);
} else {
// declare new queue
$this->queue->setFlags(AMQP_EXCLUSIVE | AMQP_AUTODELETE);
$this->queue->declare();
}
if (is_array($args)) {
$this->queue->setArguments($args);
}
}
示例2: __construct
/**
* Create a new channel instance.
*
* @param string $name
* @return void
*/
public function __construct($name)
{
parent::__construct('private-' . $name);
}
示例3: __construct
/**
* @param Kafka $connection
*/
public function __construct(Kafka $connection)
{
parent::__construct($connection);
$this->messageQueue = array();
}
示例4: __construct
public function __construct($socket, $timeout)
{
parent::__construct(uniqid(), null, $socket, $timeout);
$this->fresh = true;
}
示例5: __construct
public function __construct($connection, $exchange_name)
{
parent::__construct($connection);
$this->exchange = new \AMQPExchange($this->channel);
$this->exchange->setName($exchange_name);
}