/** * @param string $definition * @param ReflectionElement $context * @param NULL $expectedName * @return ReflectionElement|bool|NULL */ public function resolveElement($definition, $context, &$expectedName = NULL) { $reflection = $this->elementResolver->resolveElement($definition, $context, $expectedName); if ($reflection) { return $reflection; } return FALSE; }
/** * @param string $value * @param ReflectionElement $reflectionElement * @return string */ private function processUsesAndUsedbyAnnotations($value, ReflectionElement $reflectionElement) { list($link, $description) = Strings::split($value); $separator = $reflectionElement instanceof ReflectionClass || !$description ? ' ' : '<br>'; if ($this->elementResolver->resolveElement($link, $reflectionElement) !== NULL) { $value = $this->typeLinks($link, $reflectionElement) . $separator . $description; return trim($value); } return NULL; }
private function loadUsesToReferencedElementUsedby(ReflectionElement $element) { $uses = $element->getAnnotation('uses'); if ($uses === NULL) { return; } foreach ($uses as $value) { list($link, $description) = preg_split('~\\s+|$~', $value, 2); $resolved = $this->elementResolver->resolveElement($link, $element); if ($resolved) { $resolved->addAnnotation('usedby', $element->getPrettyName() . ' ' . $description); } } }