Properties

$arguments

$arguments : array

Method arguments

Type

array

$name

$name : string

Method name

Type

string

$visibility

$visibility : string

Method visibility

Type

string

$static

$static : boolean

Method static flag

Type

boolean

$abstract

$abstract : boolean

Method abstract flag

Type

boolean

$final

$final : boolean

Method final flag

Type

boolean

$interface

$interface : boolean

Method interface flag

Type

boolean

$body

$body : string

Method body

Type

string

$indent

$indent : string

Method indent

Type

string

$output

$output : string

Method output

Type

string

Methods

__construct()

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

Constructor

Instantiate the method generator object

Parameters

string $name
string $visibility
boolean $static

setStatic()

setStatic(boolean  $static = false) : \Pop\Code\Generator\MethodGenerator

Set the method static flag

Parameters

boolean $static

Returns

\Pop\Code\Generator\MethodGenerator

isStatic()

isStatic() : boolean

Get the method static flag

Returns

boolean

setAbstract()

setAbstract(boolean  $abstract = false) : \Pop\Code\Generator\MethodGenerator

Set the method abstract flag

Parameters

boolean $abstract

Returns

\Pop\Code\Generator\MethodGenerator

isAbstract()

isAbstract() : boolean

Get the method abstract flag

Returns

boolean

setFinal()

setFinal(boolean  $final = false) : \Pop\Code\Generator\MethodGenerator

Set the method final flag

Parameters

boolean $final

Returns

\Pop\Code\Generator\MethodGenerator

isFinal()

isFinal() : boolean

Get the method final flag

Returns

boolean

setInterface()

setInterface(boolean  $interface = false) : \Pop\Code\Generator\MethodGenerator

Set the method interface flag

Parameters

boolean $interface

Returns

\Pop\Code\Generator\MethodGenerator

isInterface()

isInterface() : boolean

Get the method interface flag

Returns

boolean

getDesc()

getDesc() : string

Get the method description

Returns

string

setIndent()

setIndent(string  $indent = null) : \Pop\Code\Generator\MethodGenerator

Set the method indent

Parameters

string $indent

Returns

\Pop\Code\Generator\MethodGenerator

getIndent()

getIndent() : string

Get the method indent

Returns

string

getName()

getName() : string

Get the method name

Returns

string

setBody()

setBody(string  $body, boolean  $newline = true) : \Pop\Code\Generator\MethodGenerator

Set the method body

Parameters

string $body
boolean $newline

Returns

\Pop\Code\Generator\MethodGenerator

appendToBody()

appendToBody(string  $body, boolean  $newline = true) : \Pop\Code\Generator\MethodGenerator

Append to the method body

Parameters

string $body
boolean $newline

Returns

\Pop\Code\Generator\MethodGenerator

getBody()

getBody() : string

Get the method body

Returns

string

setVisibility()

setVisibility(string  $visibility = 'public') : \Pop\Code\Generator\MethodGenerator

Set the method visibility

Parameters

string $visibility

Returns

\Pop\Code\Generator\MethodGenerator

getVisibility()

getVisibility() : string

Get the method visibility

Returns

string

addArgument()

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

Add a method argument

Parameters

string $name
mixed $value
string $type

Returns

\Pop\Code\Generator\MethodGenerator

addParameter()

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

Add a method argument (alias method for convenience)

Parameters

string $name
mixed $value
string $type

Returns

\Pop\Code\Generator\MethodGenerator

addParameters()

addParameters(array  $args) : \Pop\Code\Generator\MethodGenerator

Add method arguments (alias method for convenience)

Parameters

array $args

Returns

\Pop\Code\Generator\MethodGenerator

getArgument()

getArgument(string  $name) : array

Get a method argument

Parameters

string $name

Returns

array

getArguments()

getArguments() : array

Get the method arguments

Returns

array

getParameter()

getParameter(string  $name) : array

Get a method argument (alias method for convenience)

Parameters

string $name

Returns

array

getParameters()

getParameters() : array

Get the method arguments (alias method for convenience)

Returns

array

render()

render(boolean  $ret = false) : mixed

Render method

Parameters

boolean $ret

Returns

mixed

__toString()

__toString() : string

Print method

Returns

string

formatArguments()

formatArguments() : string

Format the arguments

Returns

string