public static function Enum::toArray in Drupal driver for SQL Server and SQL Azure 8.2
Returns all possible values as an array
Return value
array Constant name in key, constant value in value
5 calls to Enum::toArray()
- Enum::isValid in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Component/ Enum.php - Check if is valid enum value
- Enum::isValidKey in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Component/ Enum.php - Check if is valid enum key
- Enum::keys in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Component/ Enum.php - Returns the names (keys) of all constants in the Enum class
- Enum::search in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Component/ Enum.php - Return key for value
- Enum::values in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Component/ Enum.php - Returns instances of the Enum class of all Enum constants
File
- drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Component/ Enum.php, line 100
Class
- Enum
- Enum class.
Namespace
Drupal\Driver\Database\sqlsrv\ComponentCode
public static function toArray() {
$class = get_called_class();
if (!array_key_exists($class, self::$cache)) {
$reflection = new ReflectionClass($class);
self::$cache[$class] = $reflection
->getConstants();
}
return self::$cache[$class];
}