Managing constants easily

Comparing #1 with #2

Revision #2 was created by briiC.lv briiC.lv on Dec 10, 2011, 8:45:10 AM.

public function => public static function (thanks to twisted1919)

Content

[...]
### getConstants()
For this small problem i am using function **getConstants()**.

```php
public
static function getConstants($token,$objectClass) {
$tokenLen = strlen($token);
[...]
Class::getConstants('MY_STATUS');
*/
public
static function getConstants($token,$objectClass) {
$tokenLen = strlen($token);
[...]
}
//..
public
static function getStatuses() { return self::getConstants('STATUS_',__CLASS__); } public static function getTypes() {
return self::getConstants('TYPE_',__CLASS__);
}

}
```
[...]