public static function get($version)
{
if (!isset(self::$profiles[$version])) {
throw new ClientException("Unknown server profile: '{$version}'.");
}
$profile = self::$profiles[$version];
return new $profile();
}
/** * {@inheritdoc} */ public function filter(OptionsInterface $options, $value) { if (is_string($value)) { $value = Factory::get($value); $this->setProcessors($options, $value); } elseif (!$value instanceof ProfileInterface) { throw new InvalidArgumentException('Invalid value for the profile option.'); } return $value; }