
ze-ph.QueryParameterType.php.mustache Maven / Gradle / Ivy
The newest version!
type) {
case QueryParameter::TYPE_INT:
return is_string($value) && preg_match('/^(' . self::RE_INT . ')$/', $value);
case QueryParameter::TYPE_BOOL:
return is_string($value) && preg_match('/^(' . self::RE_BOOL . ')$/', $value);
case QueryParameter::TYPE_FLOAT:
return is_string($value) && preg_match('/^(' . self::RE_FLOAT . ')$/', $value);
case QueryParameter::TYPE_STRING:
return is_string($value);
default:
throw new \InvalidArgumentException(sprintf('Can not check for type %s.', $this->type));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy