public static forLanguage ( string $language, Exception $cause = null ) : static | ||
$language | string | The unsupported language. |
$cause | Exception | The exception that caused this exception. |
return | static | The created exception. |
public static function forLanguage($language, Exception $cause = null)
{
return new static(sprintf('The language "%s" is not supported.', $language), 0, $cause);
}
/** * {@inheritdoc} */ public function unbind($query, $typeName = null, array $parameterValues = null, $language = null) { if (null !== $language && 'glob' !== $language) { throw UnsupportedLanguageException::forLanguage($language); } if (null !== $typeName) { $this->removeBindingsByQueryAndType($query, $typeName, $parameterValues); return; } $this->removeBindingsByQuery($query, $parameterValues); }