/** * @param $username * @param $password * @throws \Exception */ public function login($username, $password) { $this->transport->login($username, $password); $this->transport->subscribeToResources(); $this->profile = $this->transport->loadProfile($username); $this->contacts = $this->transport->loadContacts($username); $this->transport->createStatusEndpoint(); $this->transport->setStatus(self::STATUS_ONLINE); }