ApiGen\Parser\Broker\Backend::loadAnnotationFromReflection PHP Method

loadAnnotationFromReflection() private method

private loadAnnotationFromReflection ( ApiGen\Contracts\Parser\Reflection\ClassReflectionInterface | ApiGen\Contracts\Parser\Reflection\MethodReflectionInterface $reflection, array $annotations, string $name )
$reflection ApiGen\Contracts\Parser\Reflection\ClassReflectionInterface | ApiGen\Contracts\Parser\Reflection\MethodReflectionInterface
$annotations array
$name string
    private function loadAnnotationFromReflection($reflection, array $annotations, $name)
    {
        if (!isset($annotations[$name])) {
            return;
        }
        foreach ($annotations[$name] as $doc) {
            foreach (explode('|', preg_replace('~\\s.*~', '', $doc)) as $name) {
                if ($name = rtrim($name, '[]')) {
                    $name = $this->getClassFqn($name, $reflection);
                    $this->addClass($name);
                }
            }
        }
    }