class Printer

Generates PHP code.

Properties

protected string $indentation
protected int $linesBetweenMethods

Methods

string
printFunction(GlobalFunction $function, PhpNamespace $namespace = null)

No description

string
printClosure(Closure $closure)

No description

string
printMethod(Method $method, PhpNamespace $namespace = null)

No description

string
printClass(ClassType $class, PhpNamespace $namespace = null)

No description

string
printNamespace(PhpNamespace $namespace)

No description

string
printFile(PhpFile $file)

No description

setTypeResolving(bool $state = true)

No description

string
indent(string $s)

No description

string
dump($var)

No description

string
printUses(PhpNamespace $namespace)

No description

string
printParameters(FunctionLike $function, PhpNamespace|null $namespace)

No description

string
printReturnType(FunctionLike $function, PhpNamespace|null $namespace)

No description

Details

at line 33
string printFunction(GlobalFunction $function, PhpNamespace $namespace = null)

No description

Parameters

GlobalFunction $function
PhpNamespace $namespace

Return Value

string

at line 45
string printClosure(Closure $closure)

No description

Parameters

Closure $closure

Return Value

string

at line 64
string printMethod(Method $method, PhpNamespace $namespace = null)

No description

Parameters

Method $method
PhpNamespace $namespace

Return Value

string

at line 86
string printClass(ClassType $class, PhpNamespace $namespace = null)

No description

Parameters

ClassType $class
PhpNamespace $namespace

Return Value

string

at line 139
string printNamespace(PhpNamespace $namespace)

No description

Parameters

PhpNamespace $namespace

Return Value

string

at line 164
string printFile(PhpFile $file)

No description

Parameters

PhpFile $file

Return Value

string

at line 184
Printer setTypeResolving(bool $state = true)

No description

Parameters

bool $state

Return Value

Printer

at line 191
protected string indent(string $s)

No description

Parameters

string $s

Return Value

string

at line 197
protected string dump($var)

No description

Parameters

$var

Return Value

string

at line 203
protected string printUses(PhpNamespace $namespace)

No description

Parameters

PhpNamespace $namespace

Return Value

string

at line 223
protected string printParameters(FunctionLike $function, PhpNamespace|null $namespace)

No description

Parameters

FunctionLike $function
PhpNamespace|null $namespace

Return Value

string

at line 246
protected string printReturnType(FunctionLike $function, PhpNamespace|null $namespace)

No description

Parameters

FunctionLike $function
PhpNamespace|null $namespace

Return Value

string

Traits

SmartObject