Class

PHP5ObjectBuilder

class PHP5ObjectBuilder extends ObjectBuilder

Generates a PHP5 base Object class for user object model (OM).

This class produces the base object class (e.g. BaseMyTable) which contains all the custom-built accessor and setter methods.

Methods

__construct(Table $table)

Constructs a new PeerBuilder subclass.

from ObjectBuilder
boolean hasBehaviorModifier(string $hookName, string $modifier = null)

Checks whether any registered behavior on that table has a modifier for a hook

from ObjectBuilder
applyBehaviorModifier($hookName, $script, $tab = ' ')

Checks whether any registered behavior on that table has a modifier for a hook

from ObjectBuilder
getBehaviorContent(string $contentName)

Checks whether any registered behavior content creator on that table exists a contentName

from ObjectBuilder
string getPackage()

Gets the package for the [base] object classes.

getNamespace()

string getDefaultKeyType()

Returns default key type.

string getUnprefixedClassname()

Returns the name of the current class being built.

addTemporalAccessorComment(string $script, Column $col)

Adds the comment for a temporal accessor

addTemporalAccessorOpen(string $script, Column $col)

Adds the function declaration for a temporal accessor

addDefaultAccessorComment(string $script, Column $col)

Add the comment for a default accessor method (a getter)

addDefaultAccessorOpen(string $script, Column $col)

Adds the function declaration for a default accessor

addMutatorComment(string $script, Column $col)

Adds the comment for a mutator

addMutatorOpenOpen(string $script, Column $col)

Adds the mutator function declaration

addTemporalMutatorComment($script, Column $col)

addBooleanMutatorComment($script, Column $col)

string getFKVarName(ForeignKey $fk)

Constructs variable name for fkey-related objects.

string getRefFKCollVarName(ForeignKey $fk)

Constructs variable name for objects which referencing current table by specified foreign key.

string getPKRefFKVarName(ForeignKey $fk)

Constructs variable name for single object which references current table by specified foreign key which is ALSO a primary key (hence one-to-one relationship).

Details

in ObjectBuilder at line 30
public __construct(Table $table)

Constructs a new PeerBuilder subclass.

Parameters

Table $table

in ObjectBuilder at line 198
public boolean hasBehaviorModifier(string $hookName, string $modifier = null)

Checks whether any registered behavior on that table has a modifier for a hook

Parameters

string $hookName The name of the hook as called from one of this class methods, e.g. "preSave"
string $modifier The name of the modifier object providing the method in the behavior

Return Value

boolean

in ObjectBuilder at line 209
public applyBehaviorModifier($hookName, $script, $tab = ' ')

Checks whether any registered behavior on that table has a modifier for a hook

Parameters

$hookName
$script
$tab

in ObjectBuilder at line 219
public getBehaviorContent(string $contentName)

Checks whether any registered behavior content creator on that table exists a contentName

Parameters

string $contentName The name of the content as called from one of this class methods, e.g. "parentClassname"

at line 30
public string getPackage()

Gets the package for the [base] object classes.

Return Value

string

at line 35
public getNamespace()

at line 51
public string getDefaultKeyType()

Returns default key type.

if not presented in configuration default will be 'TYPE_PHPNAME'

Return Value

string

at line 63
public string getUnprefixedClassname()

Returns the name of the current class being built.

Return Value

string

at line 821
public addTemporalAccessorComment(string $script, Column $col)

Adds the comment for a temporal accessor

Parameters

string $script The script will be modified in this method.
Column $col The current column.

See also

addTemporalAccessor

at line 877
public addTemporalAccessorOpen(string $script, Column $col)

Adds the function declaration for a temporal accessor

Parameters

string $script The script will be modified in this method.
Column $col The current column.

See also

addTemporalAccessor

at line 1250
public addDefaultAccessorComment(string $script, Column $col)

Add the comment for a default accessor method (a getter)

Parameters

string $script The script will be modified in this method.
Column $col The current column.

See also

addDefaultAccessor()

at line 1275
public addDefaultAccessorOpen(string $script, Column $col)

Adds the function declaration for a default accessor

Parameters

string $script The script will be modified in this method.
Column $col The current column.

See also

addDefaultAccessor()

at line 1489
public addMutatorComment(string $script, Column $col)

Adds the comment for a mutator

Parameters

string $script The script will be modified in this method.
Column $col The current column.

See also

addMutatorOpen()

at line 1509
public addMutatorOpenOpen(string $script, Column $col)

Adds the mutator function declaration

Parameters

string $script The script will be modified in this method.
Column $col The current column.

See also

addMutatorOpen()

at line 1725
public addTemporalMutatorComment($script, Column $col)

Parameters

$script
Column $col

at line 1954
public addBooleanMutatorComment($script, Column $col)

Parameters

$script
Column $col

at line 3305
public string getFKVarName(ForeignKey $fk)

Constructs variable name for fkey-related objects.

Parameters

ForeignKey $fk

Return Value

string

at line 3317
public string getRefFKCollVarName(ForeignKey $fk)

Constructs variable name for objects which referencing current table by specified foreign key.

Parameters

ForeignKey $fk

Return Value

string

at line 3330
public string getPKRefFKVarName(ForeignKey $fk)

Constructs variable name for single object which references current table by specified foreign key which is ALSO a primary key (hence one-to-one relationship).

Parameters

ForeignKey $fk

Return Value

string