Lines Matching refs:Name
5 use PhpParser\Node\Name; alias
6 use PhpParser\Node\Name\FullyQualified;
10 /** @var null|Name Current namespace */
11 protected ?Name $namespace;
13 /** @var Name[][] Map of format [aliasType => [aliasName => originalName]] */
16 /** @var Name[][] Same as $aliases but preserving original case */
36 * @param Name|null $namespace Null is the global namespace
38 public function startNamespace(?Name $namespace = null): void {
50 * @param Name $name Original name
55 … public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []): void {
87 * @return null|Name Namespace (or null if global namespace)
89 public function getNamespace(): ?Name {
96 * @param Name $name Name to resolve
99 * @return null|Name Resolved name, or null if static resolution is not possible
101 public function getResolvedName(Name $name, int $type): ?Name {
140 * @param Name $name Class ame to resolve
142 * @return Name Resolved name
144 public function getResolvedClassName(Name $name): Name {
154 * @return Name[] Possible representations of the name
162 return [new Name($name)];
181 $possibleNames[] = new Name($alias . substr($name, strlen($lcOrig)));
191 $possibleNames[] = new Name($alias);
196 $possibleNames[] = new Name($alias);
210 * @return Name Shortest representation
212 public function getShortName(string $name, int $type): Name {
229 private function resolveAlias(Name $name, int $type): ?FullyQualified {
252 private function getNamespaceRelativeName(string $name, string $lcName, int $type): ?Name {
254 return new Name($name);
261 return new Name($name);
267 return new Name(substr($name, strlen($namespacePrefix)));