PhpFile
final class PhpFile
Instance of PHP file.
Generates:
- opening tag (<?php)
- doc comments
- one or more namespaces
Methods
addInterface(string $name)
No description
array
getNamespaces()
No description
setStrictTypes(bool $on = true)
Adds declare(strict_types=1) to output.
bool
hasStrictTypes()
No description
bool
string
__toString()
No description
Details
at line 35
ClassType
addClass(string $name)
No description
at line 43
ClassType
addInterface(string $name)
No description
at line 51
ClassType
addTrait(string $name)
No description
at line 60
PhpNamespace
addNamespace(string|PhpNamespace $namespace)
No description
at line 80
array
getNamespaces()
No description
at line 87
PhpFile
addUse(string $name, string $alias = null)
No description
at line 98
PhpFile
setStrictTypes(bool $on = true)
Adds declare(strict_types=1) to output.
at line 105
bool
hasStrictTypes()
No description
at line 112
bool
getStrictTypes()
deprecated
deprecated
No description
at line 118
string
__toString()
No description
Traits
SmartObject