Printer
class Printer
Generates PHP code.
Properties
$wrapLength | |||
$indentation | |||
$linesBetweenProperties | |||
$linesBetweenMethods | |||
$returnTypeColon | |||
protected | $namespace | ||
protected | $dumper |
Methods
__construct()
No description
string
string
string
string
printMethod(Method $method, PhpNamespace|null $namespace = null, bool $isInterface = false)
No description
string
string
string
string
printParameters(Method $function, int $column = 0)
No description
string
printType(string|null $type, bool $nullable)
No description
setTypeResolving(bool $state = true)
No description
string
indent(string $s)
No description
string
dump($var, int $column = 0)
No description
Details
at line 33
__construct()
No description
at line 39
string
printFunction(GlobalFunction $function, PhpNamespace|null $namespace = null)
No description
at line 57
string
printClosure(Closure $closure, PhpNamespace|null $namespace = null)
No description
at line 80
string
printArrowFunction(Closure $closure, PhpNamespace|null $namespace = null)
No description
at line 100
string
printMethod(Method $method, PhpNamespace|null $namespace = null, bool $isInterface = false)
No description
at line 129
string
printClass(ClassType $class, PhpNamespace|null $namespace = null)
No description
at line 221
string
printNamespace(PhpNamespace $namespace)
No description
at line 253
string
printFile(PhpFile $file)
No description
at line 270
protected string
printUses(PhpNamespace $namespace, string $of = PhpNamespace::NAME_NORMAL)
No description
at line 289
protected string
printParameters(Method $function, int $column = 0)
No description
at line 324
protected string
printType(string|null $type, bool $nullable)
No description
at line 372
Printer
setTypeResolving(bool $state = true)
No description
at line 379
protected string
indent(string $s)
No description
at line 386
protected string
dump($var, int $column = 0)
No description
Traits
Strict class for better experience.