\Pop\Code\GeneratorBodyGenerator

Body generator class

Summary

Methods
Properties
Constants
setDocblock()
getDocblock()
hasDocblock()
setDesc()
getDesc()
hasDesc()
setBody()
appendToBody()
indentBody()
getBody()
hasBody()
setIndent()
getIndent()
hasIndent()
printIndent()
getOutput()
hasOutput()
isRendered()
render()
createReturnConfig()
__toString()
No public properties found
No constants found
No protected methods found
$docblock
$body
$indent
$output
N/A
No private methods found
No private properties found
N/A

Properties

$body

$body : string

Function body

Type

string

$indent

$indent : integer

Code indent spaces

Type

integer

$output

$output : string

Output string

Type

string

Methods

hasDocblock()

hasDocblock() : boolean

Has docblock generator object

Returns

boolean

getDesc()

getDesc() : string

Get the docblock description

Returns

string

hasDesc()

hasDesc() : boolean

Has a docblock description

Returns

boolean

setBody()

setBody(string  $body, integer  $indent = 4) : \Pop\Code\Generator\Traits\BodyTrait

Set the function body

Parameters

string $body
integer $indent

Returns

\Pop\Code\Generator\Traits\BodyTrait

indentBody()

indentBody(integer  $indent) : \Pop\Code\Generator\Traits\BodyTrait

Append to the function body

Parameters

integer $indent

Returns

\Pop\Code\Generator\Traits\BodyTrait

getBody()

getBody() : string

Get the function body

Returns

string

hasBody()

hasBody() : boolean

Has method body

Returns

boolean

getIndent()

getIndent() : integer

Get the indent

Returns

integer

hasIndent()

hasIndent() : boolean

Has indent

Returns

boolean

printIndent()

printIndent() : string

Print the indent

Returns

string

getOutput()

getOutput() : string

Get the output

Returns

string

hasOutput()

hasOutput() : boolean

Has output

Returns

boolean

isRendered()

isRendered() : boolean

Is rendered (alias to hasOutput())

Returns

boolean

render()

render() : string

Render body

Returns

string

createReturnConfig()

createReturnConfig(array  $config, integer  $indent = 4) : \Pop\Code\Generator\BodyGenerator

Create return config

Parameters

array $config
integer $indent

Returns

\Pop\Code\Generator\BodyGenerator

__toString()

__toString() : string

Print function

Returns

string