/**
  * Returns visible properties declared by traits.
  *
  * @return array
  */
 public function getTraitProperties()
 {
     $properties = array();
     foreach ($this->reflection->getTraitProperties(self::$propertyAccessLevels) as $property) {
         $apiProperty = new ReflectionProperty($property, self::$generator);
         if (!$this->isDocumented() || $apiProperty->isDocumented()) {
             $properties[$property->getName()] = $apiProperty;
         }
     }
     return $properties;
 }
Esempio n. 2
0
 /**
  * Sorts functions by FQN.
  *
  * @param \ApiGen\ReflectionProperty $one
  * @param \ApiGen\ReflectionProperty $two
  *
  * @return integer
  */
 private function sortProperties(ReflectionProperty $one, ReflectionProperty $two)
 {
     return strcasecmp($one->getDeclaringClassName() . '::' . $one->getName(), $two->getDeclaringClassName() . '::' . $two->getName());
 }
 /**
  * Returns a link to property in class summary file.
  *
  * @param \ApiGen\ReflectionProperty $property Property reflection
  * @param \ApiGen\ReflectionClass    $class    Property declaring class
  *
  * @return string
  */
 public function getPropertyUrl(ReflectionProperty $property, ReflectionClass $class = null)
 {
     $className = null !== $class ? $class->getName() : $property->getDeclaringClassName();
     return $this->getClassUrl($className) . '#' . ($property->isMagic() ? 'm' : '') . '$' . $property->getName();
 }