Added missing toString() method
This commit is contained in:
parent
bb9ab81fed
commit
89c9a004ee
1 changed files with 7 additions and 0 deletions
|
@ -7,4 +7,11 @@ class Enum
|
|||
$constants = $cls->getConstants();
|
||||
return array_search($constant, $constants);
|
||||
}
|
||||
|
||||
public static function getAll()
|
||||
{
|
||||
$cls = new ReflectionClass(get_called_class());
|
||||
$constants = $cls->getConstants();
|
||||
return array_values($constants);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue