Propel API
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($hookName, $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 190
public boolean hasBehaviorModifier($hookName, $modifier = null)

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

Parameters

$hookName
$modifier

Return Value

boolean

in ObjectBuilder at line 200
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 209
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 29
public string getPackage()

Gets the package for the [base] object classes.

Return Value

string

at line 34
public getNamespace()

at line 49
public string getDefaultKeyType()

Returns default key type.

if not presented in configuration default will be 'TYPE_PHPNAME'

Return Value

string

at line 60
public string getUnprefixedClassname()

Returns the name of the current class being built.

Return Value

string

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

Adds the comment for a temporal accessor

Parameters

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

See also

addTemporalAccessor

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

Adds the function declaration for a temporal accessor

Parameters

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

See also

addTemporalAccessor

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

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

Parameters

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

See also

addDefaultAccessor()

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

Adds the function declaration for a default accessor

Parameters

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

See also

addDefaultAccessor()

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

Adds the comment for a mutator

Parameters

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

See also

addMutatorOpen()

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

Adds the mutator function declaration

Parameters

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

See also

addMutatorOpen()

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

Parameters

$script
Column $col

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

Parameters

$script
Column $col

at line 3078
public string getFKVarName(ForeignKey $fk)

Constructs variable name for fkey-related objects.

Parameters

ForeignKey $fk

Return Value

string

at line 3088
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 3099
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