mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 16:04:35 +02:00
Add lib/PhpAmqpLib
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
namespace PhpAmqpLib\Connection;
|
||||
|
||||
class AMQPLazyConnection extends AMQPConnection
|
||||
{
|
||||
/**
|
||||
* Gets socket from current connection
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
public function getSocket()
|
||||
{
|
||||
$this->connect();
|
||||
|
||||
return parent::getSocket();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function channel($channel_id = null)
|
||||
{
|
||||
$this->connect();
|
||||
|
||||
return parent::channel($channel_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null|\PhpAmqpLib\Wire\IO\AbstractIO
|
||||
*/
|
||||
protected function getIO()
|
||||
{
|
||||
if (!$this->io) {
|
||||
$this->connect();
|
||||
}
|
||||
|
||||
return $this->io;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should the connection be attempted during construction?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function connectOnConstruct()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user