PhpNamespace
final class PhpNamespace
Namespaced part of a PHP file.
Generates:
- namespace statement
- variable amount of use statements
- one or more class declarations
Constants
private KEYWORDS |
|
Methods
__construct(string $name)
No description
string
getName()
No description
setBracketedSyntax(bool $state = true)
No description
bool
hasBracketedSyntax()
No description
bool
addUse(string $name, string $alias = null, string $aliasOut = null)
No description
array
getUses()
No description
string
unresolveUnionType(string $type)
No description
string
unresolveName(string $name)
No description
addInterface(string $name)
No description
array
getClasses()
No description
string
__toString()
No description
Details
at line 48
__construct(string $name)
No description
at line 57
string
getName()
No description
at line 67
PhpNamespace
setBracketedSyntax(bool $state = true)
internal |
No description
at line 74
bool
hasBracketedSyntax()
No description
at line 81
bool
getBracketedSyntax()
deprecated
deprecated
No description
at line 91
PhpNamespace
addUse(string $name, string $alias = null, string $aliasOut = null)
No description
at line 123
array
getUses()
No description
at line 129
string
unresolveUnionType(string $type)
No description
at line 135
string
unresolveName(string $name)
No description
at line 161
PhpNamespace
add(ClassType $class)
No description
at line 173
ClassType
addClass(string $name)
No description
at line 180
ClassType
addInterface(string $name)
No description
at line 186
ClassType
addTrait(string $name)
No description
at line 193
array
getClasses()
No description
at line 199
string
__toString()
No description
Traits
Strict class for better experience.