Add this method to your class definition if you want an array of class constants (get_defined_constants doesn't work with class constants as Peter P said above):
<?php
public function get_class_constants()
{
$reflect = new ReflectionClass(get_class($this));
return $reflect->getConstants());
}
?>
You could also override stdObject with it so that all your classes have this method