/** * {@inheritdoc} */ public function connect() { if (!$this->current) { if (!($this->current = $this->pickSlave())) { $this->current = $this->getMaster(); } } $this->current->connect(); }
/** * {@inheritdoc} */ public function connect() { if (!$this->current) { if (!($this->current = $this->pickSlave())) { if (!($this->current = $this->getMaster())) { throw new ClientException('No available connection for replication'); } } } $this->current->connect(); }
/** * {@inheritdoc} */ public function connect() { return $this->connection->connect(); }