PhpNamespace
final class PhpNamespace
Namespaced part of a PHP file.
Generates:
- namespace statement
- variable amount of use statements
- one or more class declarations
Constants
NameNormal |
|
NameFunction |
|
NameConstant |
|
deprecated NAME_NORMAL |
|
deprecated NAME_FUNCTION |
|
deprecated NAME_CONSTANT |
|
Methods
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
at line 60
__construct(string $name)
No description
at line 70
string
getName()
No description
at line 79
PhpNamespace
setBracketedSyntax(bool $state = true)
internal |
No description
at line 86
bool
hasBracketedSyntax()
No description
at line 93
bool
getBracketedSyntax()
deprecated
deprecated
No description
at line 103
PhpNamespace
addUse(string $name, string|null $alias = null, string $of = self::NameNormal)
No description
at line 143
void
removeUse(string $name, string $of = self::NameNormal)
No description
at line 153
PhpNamespace
addUseFunction(string $name, string|null $alias = null)
No description
at line 159
PhpNamespace
addUseConstant(string $name, string|null $alias = null)
No description
at line 166
array
getUses(string $of = self::NameNormal)
No description
at line 178
string
unresolveName(string $name)
deprecated
deprecated
No description
at line 185
string
resolveName(string $name, string $of = self::NameNormal)
No description
at line 206
string
simplifyType(string $type, string $of = self::NameNormal)
No description
at line 212
string
simplifyName(string $name, string $of = self::NameNormal)
No description
at line 256
PhpNamespace
add(EnumType $class)
No description
at line 275
ClassType
addClass(string $name)
No description
at line 282
InterfaceType
addInterface(string $name)
No description
at line 289
TraitType
addTrait(string $name)
No description
at line 296
EnumType
addEnum(string $name)
No description
at line 303
PhpNamespace
removeClass(string $name)
No description
at line 310
GlobalFunction
addFunction(string $name)
No description
at line 323
PhpNamespace
removeFunction(string $name)
No description
at line 331
array
getClasses()
No description
at line 343
array
getFunctions()
No description
at line 360
string
__toString()
No description