Properties

$indent

$indent : integer

Code indent spaces

Type

integer

$output

$output : string

Output string

Type

string

$desc

$desc : string

Docblock description

Type

string

$tags

$tags : array

Docblock tags

Type

array

Methods

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 docblock

Returns

string

__construct()

__construct(string  $desc = null, integer  $indent = 4) 

Constructor

Instantiate the docblock generator object

Parameters

string $desc
integer $indent

getDesc()

getDesc() : string

Get the docblock description

Returns

string

hasDesc()

hasDesc() : boolean

Has a docblock description

Returns

boolean

addTag()

addTag(string  $name, string  $desc = null) : \Pop\Code\Generator\DocblockGenerator

Add a basic tag

Parameters

string $name
string $desc

Returns

\Pop\Code\Generator\DocblockGenerator

getTag()

getTag(string  $name) : string

Get a tag

Parameters

string $name

Returns

string

hasTag()

hasTag(string  $name) : boolean

Has a tag

Parameters

string $name

Returns

boolean

addParam()

addParam(string  $type = null, string  $var = null, string  $desc = null) : \Pop\Code\Generator\DocblockGenerator

Add a param tag

Parameters

string $type
string $var
string $desc

Returns

\Pop\Code\Generator\DocblockGenerator

getParam()

getParam(integer  $index) : array

Get a param

Parameters

integer $index

Returns

array

hasParam()

hasParam(integer  $index) : boolean

Has a param

Parameters

integer $index

Returns

boolean

setReturn()

setReturn(string  $type, string  $desc = null) : \Pop\Code\Generator\DocblockGenerator

Add a return tag

Parameters

string $type
string $desc

Returns

\Pop\Code\Generator\DocblockGenerator

getReturn()

getReturn() : array

Get the return

Returns

array

hasReturn()

hasReturn() : boolean

Has a return

Returns

boolean

setThrows()

setThrows(string  $type, string  $desc = null) : \Pop\Code\Generator\DocblockGenerator

Add a throws tag

Parameters

string $type
string $desc

Returns

\Pop\Code\Generator\DocblockGenerator

getThrows()

getThrows() : array

Get the throws

Returns

array

hasThrows()

hasThrows() : boolean

Has a throws

Returns

boolean

__toString()

__toString() : string

Print docblock

Returns

string

formatTags()

formatTags() : string

Format the docblock tags

Returns

string

getTagLength()

getTagLength() : integer

Get the longest tag length

Returns

integer

getParamLength()

getParamLength() : integer

Get the longest param type length

Returns

integer