PhpNamespace
final class PhpNamespace
Namespaced part of a PHP file.
Generates:
- namespace statement
- variable amount of use statements
- one or more class declarations
Constants
NAME_NORMAL |
|
NAME_FUNCTION |
|
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
Details
at line 51
__construct(string $name)
No description
at line 61
string
getName()
No description
at line 70
PhpNamespace
setBracketedSyntax(bool $state = true)
internal |
No description
at line 77
bool
hasBracketedSyntax()
No description
at line 84
bool
getBracketedSyntax()
deprecated
deprecated
No description
at line 94
PhpNamespace
addUse(string $name, string|null $alias = null, string $of = self::NAME_NORMAL)
No description
at line 134
PhpNamespace
addUseFunction(string $name, string|null $alias = null)
No description
at line 140
PhpNamespace
addUseConstant(string $name, string|null $alias = null)
No description
at line 147
array
getUses(string $of = self::NAME_NORMAL)
No description
at line 159
string
unresolveName(string $name)
deprecated
deprecated
No description
at line 166
string
resolveName(string $name, string $of = self::NAME_NORMAL)
No description
at line 187
string
simplifyType(string $type, string $of = self::NAME_NORMAL)
No description
at line 193
string
simplifyName(string $name, string $of = self::NAME_NORMAL)
No description
at line 237
PhpNamespace
add(ClassType $class)
No description
at line 256
ClassType
addClass(string $name)
No description
at line 263
ClassType
addInterface(string $name)
No description
at line 269
ClassType
addTrait(string $name)
No description
at line 275
ClassType
addEnum(string $name)
No description
at line 281
GlobalFunction
addFunction(string $name)
No description
at line 295
array
getClasses()
No description
at line 307
array
getFunctions()
No description
at line 324
string
__toString()
No description
Traits
Strict class for better experience.