/** * Sorts constants by FQN. * * @param \ApiGen\ReflectionConstant $one * @param \ApiGen\ReflectionConstant $two * * @return integer */ private function sortConstants(ReflectionConstant $one, ReflectionConstant $two) { return strcasecmp(($one->getDeclaringClassName() ?: $one->getNamespaceName()) . '\\' . $one->getName(), ($two->getDeclaringClassName() ?: $two->getNamespaceName()) . '\\' . $two->getName()); }
/** * Returns a link to constant in class summary file or to constant summary file. * * @param \ApiGen\ReflectionConstant $constant Constant reflection * * @return string */ public function getConstantUrl(ReflectionConstant $constant) { // Class constant if ($className = $constant->getDeclaringClassName()) { return $this->getClassUrl($className) . '#' . $constant->getName(); } // Constant in namespace or global space return sprintf($this->config->template['templates']['main']['constant']['filename'], $this->urlize($constant->getName())); }