/** * Return last used channel id during current connection session. * * @return int */ public function getUsedChannels() { if (!$this->isConnected()) { return 0; } return $this->connection->getChannelId(); }