/** * @return string */ private function getConstantFqnName(ReflectionConstant $reflection) { $class = $reflection->getDeclaringClassName() ?: $reflection->getNamespaceName(); return $class . '\\' . $reflection->getName(); }
/** * Sorts constants by FQN. * * @param \ApiGen\Reflection\ReflectionConstant $one * @param \ApiGen\Reflection\ReflectionConstant $two * @return integer */ private function sortConstants(Reflection\ReflectionConstant $one, Reflection\ReflectionConstant $two) { return strcasecmp(($one->getDeclaringClassName() ?: $one->getNamespaceName()) . '\\' . $one->getName(), ($two->getDeclaringClassName() ?: $two->getNamespaceName()) . '\\' . $two->getName()); }
/** * @return string */ private function getGlobalConstantName(ReflectionConstant $reflectionConstant) { if ($reflectionConstant->inNamespace()) { return $reflectionConstant->getNamespaceName() . '\\' . Html::el('b')->setText($reflectionConstant->getShortName()); } else { return Html::el('b')->setText($reflectionConstant->getName()); } }