| Methods |
public
|
__construct(
non-empty-string|null $namespace,
array<string, string> $uses,
?string $className = null,
?string $functionName = null,
?TemplateTypeMap $templateTypeMap = null,
array<string, TemplateTag> $templateTags = [],
array<string, true> $typeAliasesMap = [],
bool $bypassTypeAliases = false,
array<string, string> $constUses = [],
?string $typeAliasClassName = null,
?string $fileName = null,
array<string, array{(TypeAlias|TypeAliasImportTag), string}> $functionTypeAliases = [],
)
Parameters
| $uses |
alias(string) => fullName(string)
|
| $constUses |
alias(string) => fullName(string)
|
| $functionTypeAliases |
aliases declared or imported above the enclosing functions and methods, with the key they are cached under
|
|
#
|
public
|
getFileName(): ?string
The file the PHPDoc resolved in this scope is in, if it is in one.
The file the PHPDoc resolved in this scope is in, if it is in one.
|
#
|
public
|
getNamespace(): ?string
|
#
|
public
|
getUses(): array<string, string>
|
#
|
public
|
hasUseAlias(string $name): bool
|
#
|
public
|
getConstUses(): array<string, string>
|
#
|
public
|
getClassName(): ?string
|
#
|
public
|
getFunctionName(): ?string
|
#
|
public
|
getClassNameForTypeAlias(): ?string
|
#
|
public
|
resolveStringName(string $name): string
|
#
|
public
|
resolveConstantNames(string $name): non-empty-list<string>
|
#
|
public
|
getTemplateTypeScope(): ?TemplateTypeScope
|
#
|
public
|
getTemplateTypeMap(): TemplateTypeMap
|
#
|
public
|
getTemplateTags(): array<string, TemplateTag>
|
#
|
public
|
resolveTemplateTypeName(string $name): ?Type
|
#
|
public
|
withTemplateTypeMap(TemplateTypeMap $map, array<string, TemplateTag> $templateTags): self
|
#
|
public
|
withoutNamespaceAndUses(): self
|
#
|
public
|
withClassName(string $className): self
|
#
|
public
|
unsetTemplateType(string $name): self
|
#
|
public
|
bypassTypeAliases(): self
|
#
|
public
|
shouldBypassTypeAliases(): bool
|
#
|
public
|
hasTypeAlias(string $alias): bool
|
#
|
public
|
getFunctionTypeAlias(string $alias): array{(TypeAlias|TypeAliasImportTag), string}|null
An alias declared or imported above an enclosing function or method, with the key it is cached under.
It takes precedence over an alias of the class.
An alias declared or imported above an enclosing function or method, with the key it is cached under.
It takes precedence over an alias of the class.
|
#
|
public
|
getFunctionTypeAliases(): array<string, array{(TypeAlias|TypeAliasImportTag), string}>
|
#
|
public
|
withFunctionTypeAliases(
callable(self): array<string, array{(TypeAlias|TypeAliasImportTag), string}> $createFunctionTypeAliases,
): self
Parameters
| $createFunctionTypeAliases |
gets the new name scope,
which the aliases declared in it resolve in
|
|
#
|