Home
last modified time | relevance | path

Searched refs:nameContext (Results 1 – 2 of 2) sorted by relevance

/PHP-Parser/test/PhpParser/
H A DNameContextTest.php13 $nameContext = new NameContext(new ErrorHandler\Throwing());
14 $nameContext->startNamespace(new Name('NS'));
15 $nameContext->addAlias(new Name('Foo'), 'Foo', Use_::TYPE_NORMAL);
16 $nameContext->addAlias(new Name('Foo\Bar'), 'Alias', Use_::TYPE_NORMAL);
17 $nameContext->addAlias(new Name('Foo\fn'), 'fn', Use_::TYPE_FUNCTION);
18 $nameContext->addAlias(new Name('Foo\CN'), 'CN', Use_::TYPE_CONSTANT);
20 $possibleNames = $nameContext->getPossibleNames($name, $type);
31 $nameContext->getShortName($name, $type)->toCodeString()
/PHP-Parser/lib/PhpParser/NodeVisitor/
H A DNameResolver.php16 protected NameContext $nameContext; variable in PhpParser\\NodeVisitor\\NameResolver
38 $this->nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing());
47 return $this->nameContext;
51 $this->nameContext->startNamespace();
57 $this->nameContext->startNamespace($node->name);
177 $this->nameContext->addAlias(
223 $resolvedName = $this->nameContext->getResolvedName($name, $type);
228 $this->nameContext->getNamespace(), $name, $name->getAttributes()));
240 $resolvedName = $this->nameContext->getResolvedName($name, $type);
248 $this->nameContext->getNamespace(), $name, $name->getAttributes()));
[all …]

Completed in 5 milliseconds