public static function Enum::__callStatic in Drupal driver for SQL Server and SQL Azure 7.2
Same name and namespace in other branches
- 7.3 sqlsrv/enum.inc \Enum::__callStatic()
Returns a value when called statically like so: MyEnum::SOME_VALUE() given SOME_VALUE is a class constant
Parameters
string $name:
array $arguments:
Return value
static
Throws
\BadMethodCallException
File
- sqlsrv/
enum.inc, line 137
Class
- Enum
- Base Enum class
Code
public static function __callStatic($name, $arguments) {
if (defined("static::{$name}")) {
return new static(constant("static::{$name}"));
}
throw new \BadMethodCallException("No static method or enum constant '{$name}' in class " . get_called_class());
}