2

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

Is there a way to do get all the constants in a php class. Tried get_class_vars( get_called_class() )

    class Status
{        
    const PUBLISHED = "published";
    const DRAFT = "draft";

    public static function get_types()
    {
        return array(self::PUBLISHED, self::DRAFT);
    }
}

Thanks

Community
  • 1
  • 1
jwerre
  • 9,179
  • 9
  • 60
  • 69

0 Answers0