Properties

$name

$name : string

Class name

Type

string

$parent

$parent : string

Parent class that is extended

Type

string

$interface

$interface : string

Interface that is implemented

Type

string

$abstract

$abstract : boolean

Class abstract flag

Type

boolean

$properties

$properties : array

Array of property generator objects

Type

array

$methods

$methods : array

Array of method generator objects

Type

array

$indent

$indent : string

Class indent

Type

string

$output

$output : string

Class output

Type

string

Methods

__construct()

__construct(string  $name, string  $parent = null, string  $interface = null, boolean  $abstract = false) 

Constructor

Instantiate the class generator object

Parameters

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

setAbstract()

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

Set the class abstract flag

Parameters

boolean $abstract

Returns

\Pop\Code\Generator\ClassGenerator

isAbstract()

isAbstract() : boolean

Get the class abstract flag

Returns

boolean

setIndent()

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

Set the class indent

Parameters

string $indent

Returns

\Pop\Code\Generator\ClassGenerator

getIndent()

getIndent() : string

Get the class indent

Returns

string

getName()

getName() : string

Get the class name

Returns

string

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

setInterface()

setInterface(string  $interface = null) : \Pop\Code\Generator\ClassGenerator

Set the class interface

Parameters

string $interface

Returns

\Pop\Code\Generator\ClassGenerator

getInterface()

getInterface() : string

Get the class interface

Returns

string

getProperties()

getProperties() : array

Get all properties

Returns

array

removeProperty()

removeProperty(mixed  $property) : \Pop\Code\Generator\ClassGenerator

Remove a class property

Parameters

mixed $property

Returns

\Pop\Code\Generator\ClassGenerator

getMethods()

getMethods() : array

Get all methods

Returns

array

removeMethod()

removeMethod(mixed  $method) : \Pop\Code\Generator\ClassGenerator

Remove a method property

Parameters

mixed $method

Returns

\Pop\Code\Generator\ClassGenerator

render()

render(boolean  $ret = false) : mixed

Render class

Parameters

boolean $ret

Returns

mixed

__toString()

__toString() : string

Print class

Returns

string

formatProperties()

formatProperties() : string

Format the properties

Returns

string

formatMethods()

formatMethods() : string

Format the methods

Returns

string