protected function setUp() { $this->loop = \React\EventLoop\Factory::create(); $this->object = AsyncAPIClient::factory($this->loop, array('host' => '127.0.0.1')); $this->syncClientClient = HttpClient::factory(array('host' => 'localhost')); $this->syncClient = new APIClient($this->syncClientClient); $this->conn = new \PhpAmqpLib\Connection\AMQPConnection('localhost', 5672, 'guest', 'guest', '/'); $this->channel = $this->conn->channel(); }
/** * {@inheritdoc} */ public function register(GloubsterServerInterface $server) { $this->apiClient = AsyncAPIClient::factory($server['loop'], array_merge($server['configuration']['server'], $server['configuration']['server']['server-management'])); $server['loop']->addPeriodicTimer(5, Curry::bind(array($this, 'fetchMQInformations'), $server['websocket-application'], $server['configuration'], $server['monolog'])); }