public function getCCUsername(User $user) { if ($this->type == 'gtalk') { return $user->getGtalkCCUsername(); } else { if ($this->type == 'fb') { return $user->getFacebookCCUsername(); } else { throw new \Exception('You must call setType() method on BotNotifier object before you use it. And you must set it to one of supported types.'); } } }
public function getCCUsername(User $user) { return $user->getDesktopCCUsername(); }
public function isUserOnline(User $user) { return $user->isOnline(); }