Documentation

BodyGenerator extends AbstractGenerator
in package
Uses DocblockTrait, BodyTrait

Body generator class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
4.1.0

Table of Contents

$body  : string
Function body
$docblock  : DocblockGenerator
Docblock generator object
$indent  : int
Code indent spaces
$output  : string
Output string
__toString()  : string
Print function
appendToBody()  : BodyTrait
Append to the function body
createReturnConfig()  : BodyGenerator
Create return config
getBody()  : string
Get the function body
getDesc()  : string
Get the docblock description
getDocblock()  : DocblockGenerator
Access the docblock generator object
getIndent()  : int
Get the indent
getOutput()  : string
Get the output
hasBody()  : bool
Has method body
hasDesc()  : bool
Has a docblock description
hasDocblock()  : bool
Has docblock generator object
hasIndent()  : bool
Has indent
hasOutput()  : bool
Has output
indentBody()  : BodyTrait
Append to the function body
isRendered()  : bool
Is rendered (alias to hasOutput())
printIndent()  : string
Print the indent
render()  : string
Render body
setBody()  : BodyTrait
Set the function body
setDesc()  : DocblockTrait
Set the docblock description
setDocblock()  : DocblockTrait
Set the docblock generator object
setIndent()  : AbstractGenerator
Set the indent

Properties

$body

Function body

protected string $body = null

Methods

__toString()

Print function

public __toString() : string
Return values
string

appendToBody()

Append to the function body

public appendToBody(string $body) : BodyTrait
Parameters
$body : string
Return values
BodyTrait

createReturnConfig()

Create return config

public createReturnConfig(array<string|int, mixed> $config[, int $indent = 4 ]) : BodyGenerator
Parameters
$config : array<string|int, mixed>
$indent : int = 4
Return values
BodyGenerator

getBody()

Get the function body

public getBody() : string
Return values
string

getDesc()

Get the docblock description

public getDesc() : string
Return values
string

getOutput()

Get the output

public getOutput() : string
Return values
string

hasBody()

Has method body

public hasBody() : bool
Return values
bool

hasDesc()

Has a docblock description

public hasDesc() : bool
Return values
bool

hasDocblock()

Has docblock generator object

public hasDocblock() : bool
Return values
bool

indentBody()

Append to the function body

public indentBody(int $indent) : BodyTrait
Parameters
$indent : int
Return values
BodyTrait

isRendered()

Is rendered (alias to hasOutput())

public isRendered() : bool
Return values
bool

printIndent()

Print the indent

public printIndent() : string
Return values
string

render()

Render body

public render() : string
Return values
string

setBody()

Set the function body

public setBody(string $body[, int $indent = 4 ]) : BodyTrait
Parameters
$body : string
$indent : int = 4
Return values
BodyTrait

Search results