PDepend\Engine::getNamespace PHP Метод

getNamespace() публичный Метод

Returns the analyzed namespace for the given name.
public getNamespace ( string $name ) : PDepend\Source\AST\ASTNamespace
$name string
Результат PDepend\Source\AST\ASTNamespace
    public function getNamespace($name)
    {
        if ($this->namespaces === null) {
            $msg = 'getNamespace() doesn\'t work before the source was analyzed.';
            throw new \RuntimeException($msg);
        }
        foreach ($this->namespaces as $namespace) {
            if ($namespace->getName() === $name) {
                return $namespace;
            }
        }
        throw new \OutOfBoundsException(sprintf('Unknown namespace "%s".', $name));
    }