1: <?php
2:
3: class Reflections {
4:
5: public static function constantsListValues($className, $constantsPrefix) {
6: $clazz = new ReflectionClass($className);
7: $values = array();
8: foreach ($clazz->getConstants() as $name => $value) {
9: if (strpos($name, $constantsPrefix) === 0) {
10: $values[] = $value;
11: }
12: }
13: return $values;
14: }
15:
16: }
17: