コード例 #1
0
 /**
  * Set the level of user profile privacy requested of the Tool Consumer
  *
  * @param string $launchPrivacy Must be a valid value of the
  *     `LaunchPrivacy` enumerated type
  *
  * @see LaunchPrivacy `LaunchPrivacy` enumerated type
  */
 public function setLaunchPrivacy($launchPrivacy)
 {
     if (!is_a($launchPrivacy, LaunchPrivacy::class) && !LaunchPrivacy::isValid($launchPrivacy)) {
         throw new ConfigurationException("Invalid launch privacy setting '{$launchPrivacy}'", ConfigurationException::TOOL_PROVIDER);
     } else {
         $this->launchPrivacy = empty($launchPrivacy) ? LaunchPrivacy::ANONYMOUS() : $launchPrivacy;
     }
 }