コード例 #1
0
 /**
  * Returns visible properties.
  *
  * @return array
  */
 public function getConstants()
 {
     if (null === $this->constants) {
         $this->constants = array();
         foreach ($this->reflection->getConstantReflections() as $constant) {
             $apiConstant = new ReflectionConstant($constant, self::$generator);
             if (!$this->isDocumented() || $apiConstant->isDocumented()) {
                 $this->constants[$constant->getName()] = $apiConstant;
             }
         }
     }
     return $this->constants;
 }