Properties

$uses

$uses : array

Array of namespaces to use

Type

array

$properties

$properties : array

Array of property generator objects

Type

array

$abstract

$abstract : boolean

Method abstract flag

Type

boolean

$final

$final : boolean

Method final flag

Type

boolean

$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

$parent

$parent : string

Parent class that is extended

Type

string

$interfaces

$interfaces : array

Interfaces that are implemented

Type

array

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

isAbstract()

isAbstract() : boolean

Get the method abstract flag

Returns

boolean

isFinal()

isFinal() : boolean

Get the method final flag

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, string  $parent = null, mixed  $interface = null, boolean  $abstract = false) 

Constructor

Instantiate the class generator object

Parameters

string $name
string $parent
mixed $interface
boolean $abstract

setParent()

setParent(string  $parent = null) : \Pop\Code\Generator\ClassGenerator

Set the class parent

Parameters

string $parent

Returns

\Pop\Code\Generator\ClassGenerator

getParent()

getParent() : string

Get the class parent

Returns

string

hasParent()

hasParent() : boolean

Has parent

Returns

boolean

addInterface()

addInterface(string  $interface) : \Pop\Code\Generator\ClassGenerator

Add a class interface

Parameters

string $interface

Returns

\Pop\Code\Generator\ClassGenerator

addInterfaces()

addInterfaces(array  $interfaces) : \Pop\Code\Generator\ClassGenerator

Add a class interface

Parameters

array $interfaces

Returns

\Pop\Code\Generator\ClassGenerator

getInterfaces()

getInterfaces() : array

Get the class interfaces

Returns

array

hasInterfaces()

hasInterfaces() : boolean

Has class interfaces

Returns

boolean

hasInterface()

hasInterface(string  $interface) : boolean

Has class interface

Parameters

string $interface

Returns

boolean

removeInterface()

removeInterface(string  $interface) : \Pop\Code\Generator\ClassGenerator

Remove class interface

Parameters

string $interface

Returns

\Pop\Code\Generator\ClassGenerator

__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