/** * Returns visible methods declared by traits. * * @return array */ public function getTraitMethods() { $methods = array(); foreach ($this->reflection->getTraitMethods(self::$methodAccessLevels) as $method) { $apiMethod = new ReflectionMethod($method, self::$generator); if (!$this->isDocumented() || $apiMethod->isDocumented()) { $methods[$method->getName()] = $apiMethod; } } return $methods; }
/** * Sorts methods by FQN. * * @param \ApiGen\ReflectionMethod $one * @param \ApiGen\ReflectionMethod $two * * @return integer */ private function sortMethods(ReflectionMethod $one, ReflectionMethod $two) { return strcasecmp($one->getDeclaringClassName() . '::' . $one->getName(), $two->getDeclaringClassName() . '::' . $two->getName()); }
/** * Returns a link to method in class summary file. * * @param \ApiGen\ReflectionMethod $method Method reflection * @param \ApiGen\ReflectionClass $class Method declaring class * * @return string */ public function getMethodUrl(ReflectionMethod $method, ReflectionClass $class = null) { $className = null !== $class ? $class->getName() : $method->getDeclaringClassName(); return $this->getClassUrl($className) . '#' . ($method->isMagic() ? 'm' : '') . '_' . ($method->getOriginalName() ?: $method->getName()); }