/** * @param SocialNetwork $socialNetwork * @return string * @throws \MetaPlayer\MetaPlayerException */ private function getSocialIdField(SocialNetwork $socialNetwork) { switch ($socialNetwork) { case SocialNetwork::$VK: return 'vkId'; case SocialNetwork::$MY: return 'myId'; default: throw MetaPlayerException::unsupportedSocialNetwork($socialNetwork); } }
/** * Gets social id. * @throws \MetaPlayer\MetaPlayerException * @return string */ public function getSocialId() { switch ($this->socialNetwork) { case SocialNetwork::$MY: return $this->myId; case SocialNetwork::$VK: return $this->vkId; default: throw MetaPlayerException::unsupportedSocialNetwork($this->socialNetwork); } }