3

Possible Duplicate:
Can I get CONST's defined on a PHP class?

class ApplicationMode
{
    const production = 0;
    const development = 1;
    const testing = 2;
    public function getApplicationModes()
    {
        return get_class_vars('ApplicationMode');
    }
}

i've got a class like this, and in getApplicationModes method i would like to return a list of all constants as array(key => value). The problem is that get_class_vars doesnt list constants. is there a way to get all class constants list?

Community
  • 1
  • 1

0 Answers0