예제 #1
0
 protected function getConstants()
 {
     $const = $this->reflection->getConstantReflections();
     $classname = $this->reflection->getName();
     if ($this->skip_inherited_attr) {
         $const = array_filter($const, function ($prop) use($classname) {
             return $classname == $prop->getDeclaringClassName();
         });
     }
     return array_map(function ($v) {
         return new ConstantElement($v);
     }, $const);
 }
예제 #2
0
 protected function getConstants()
 {
     return array_map(function ($v) {
         return new ConstantElement($v);
     }, $this->reflection->getConstantReflections());
 }