Connect to Disque
public connect ( ) : Disque\Connection\Node\Node | ||
리턴 | Disque\Connection\Node\Node | Connected node information |
/** * @param array $options * @return array * @throws */ public function connect($options = []) { if (!$this->autoconnect) { return $this->disque->connect($options); } else { throw new \Exception('Connection already established via autoconnect, no need to call connect()'); } }
/** * Check that we are connected to a node, and if not connect * * @throws Disque\Connection\ConnectionException */ private function checkConnected() { if (!$this->client->isConnected()) { $this->client->connect(); } }