Added missing toString() method

This commit is contained in:
Marcin Kurczewski 2013-10-08 22:59:32 +02:00
parent bb9ab81fed
commit 89c9a004ee

View file

@ -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);
}
}