Properties

$uses

$uses : array

Array of namespaces to use

Type

array

$properties

$properties : array

Array of property generator objects

Type

array

$constants

$constants : array

Array of constant generator objects

Type

array

$methods

$methods : array

Array of method generator objects

Type

array

$name

$name : string

Name

Type

string

$indent

$indent : integer

Code indent spaces

Type

integer

$output

$output : string

Output string

Type

string

Methods

addUse()

addUse(string  $use, string  $as = null) : \Pop\Code\Generator\Traits\UseTrait

Add a namespace to use

Parameters

string $use
string $as

Returns

\Pop\Code\Generator\Traits\UseTrait

hasUse()

hasUse(string  $use) : boolean

Has use

Parameters

string $use

Returns

boolean

hasUses()

hasUses() : boolean

Has uses

Returns

boolean

getUses()

getUses() : array

Get uses

Returns

array

getProperties()

getProperties() : array

Get all properties

Returns

array

hasProperty()

hasProperty(mixed  $property) : boolean

Has a class property

Parameters

mixed $property

Returns

boolean

hasProperties()

hasProperties() : boolean

Has properties

Returns

boolean

hasConstant()

hasConstant(mixed  $constant) : boolean

Has a constant

Parameters

mixed $constant

Returns

boolean

hasConstants()

hasConstants() : boolean

Has constants

Returns

boolean

getConstants()

getConstants() : array

Get all constants

Returns

array

hasMethod()

hasMethod(mixed  $method) : boolean

Has a method

Parameters

mixed $method

Returns

boolean

hasMethods()

hasMethods() : boolean

Has methods

Returns

boolean

getMethods()

getMethods() : array

Get all methods

Returns

array

getName()

getName() : string

Get the name

Returns

string

hasName()

hasName() : boolean

Get the name

Returns

boolean

hasNamespace()

hasNamespace() : boolean

Has a namespace generator object

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

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 class

Returns

string

__construct()

__construct(string  $name) 

Constructor

Instantiate the trait generator object

Parameters

string $name

__toString()

__toString() : string

Print class

Returns

string

formatConstants()

formatConstants() : string

Format the constants

Returns

string

formatProperties()

formatProperties() : string

Format the properties

Returns

string

formatMethods()

formatMethods() : string

Format the methods

Returns

string