public function onReady() { if ($this->xmppclient) { $this->xmppclient->onReady(); $this->connect(); } }