Properties

$name

$name : string

Name

Type

string

$abstract

$abstract : boolean

Method abstract flag

Type

boolean

$final

$final : boolean

Method final flag

Type

boolean

$arguments

$arguments : array

Arguments

Type

array

$body

$body : string

Method body

Type

string

$visibility

$visibility : string

Visibility

Type

string

$static

$static : boolean

Static flag

Type

boolean

$indent

$indent : integer

Code indent spaces

Type

integer

$output

$output : string

Output string

Type

string

Methods

getName()

getName() : string

Get the name

Returns

string

hasName()

hasName() : boolean

Get the name

Returns

boolean

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

isAbstract()

isAbstract() : boolean

Get the method abstract flag

Returns

boolean

isFinal()

isFinal() : boolean

Get the method final flag

Returns

boolean

addArgument()

addArgument(string  $name, mixed  $value = null, string  $type = null) : \Pop\Code\Generator\Traits\FunctionTrait

Add an argument

Parameters

string $name
mixed $value
string $type

Returns

\Pop\Code\Generator\Traits\FunctionTrait

hasArgument()

hasArgument(string  $name) : boolean

Has an argument

Parameters

string $name

Returns

boolean

hasArguments()

hasArguments() : boolean

Has arguments

Returns

boolean

getArgument()

getArgument(string  $name) : array

Get an argument

Parameters

string $name

Returns

array

getArguments()

getArguments() : array

Get the arguments

Returns

array

addParameter()

addParameter(string  $name, mixed  $value = null, string  $type = null) : \Pop\Code\Generator\Traits\FunctionTrait

Add an argument (alias method for convenience)

Parameters

string $name
mixed $value
string $type

Returns

\Pop\Code\Generator\Traits\FunctionTrait

addParameters()

addParameters(array  $args) : \Pop\Code\Generator\Traits\FunctionTrait

Add arguments (alias method for convenience)

Parameters

array $args

Returns

\Pop\Code\Generator\Traits\FunctionTrait

hasParameter()

hasParameter(string  $name) : boolean

Has an argument (alias method for convenience)

Parameters

string $name

Returns

boolean

hasParameters()

hasParameters() : boolean

Has arguments (alias method for convenience)

Returns

boolean

getParameter()

getParameter(string  $name) : array

Get an argument (alias method for convenience)

Parameters

string $name

Returns

array

getParameters()

getParameters() : array

Get the arguments (alias method for convenience)

Returns

array

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

isPublic()

isPublic() : boolean

Is visibility public

Returns

boolean

isProtected()

isProtected() : boolean

Set the visibility to protected

Returns

boolean

isPrivate()

isPrivate() : boolean

Set the visibility to private

Returns

boolean

getVisibility()

getVisibility() : string

Get the visibility

Returns

string

isStatic()

isStatic() : boolean

Get the static flag

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 method

Returns

string

__construct()

__construct(string  $name, string  $visibility = 'public', boolean  $static = false) 

Constructor

Instantiate the method generator object

Parameters

string $name
string $visibility
boolean $static

__toString()

__toString() : string

Print method

Returns

string

formatArguments()

formatArguments() : string

Format the arguments

Returns

string