Propel 2 API
Class

Propel\Generator\Builder\Om\ObjectBuilder

class ObjectBuilder extends AbstractObjectBuilder

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

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

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

from AbstractObjectBuilder
applyBehaviorModifier(string $hookName, string $script, string $tab = ' ')

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

from AbstractObjectBuilder
getBehaviorContent(string $contentName)

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

from AbstractObjectBuilder
string getPackage()

Returns the package for the base object classes.

string getNamespace()

Returns the namespace for the base class.

string getDefaultKeyType()

Returns default key type.

string getUnprefixedClassName()

Returns the name of the current class being built.

addTemporalAccessorComment(string $script, Column $column)

Adds the comment for a temporal accessor.

addTemporalAccessorOpen(string $script, Column $column)

Adds the function declaration for a temporal accessor.

addDefaultAccessorComment(string $script, Column $column)

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

addDefaultAccessorOpen(string $script, Column $column)

Adds the function declaration for a default accessor.

addMutatorComment(string $script, Column $column)

Adds the comment for a mutator.

addMutatorOpenOpen(string $script, Column $column)

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 AbstractObjectBuilder at line 171
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 AbstractObjectBuilder at line 182
public applyBehaviorModifier(string $hookName, string $script, string $tab = ' ')

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 $script &$script The script will be modified in this method.
string $tab

in AbstractObjectBuilder at line 191
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 38
public string getPackage()

Returns the package for the base object classes.

Return Value

string

at line 49
public string getNamespace()

Returns the namespace for the base class.

Return Value

string

See also

Propel\Generator\Builder\Om.AbstractOMBuilder::getNamespace()

at line 65
public string getDefaultKeyType()

Returns default key type.

If not presented in configuration default will be 'TYPE_PHPNAME'

Return Value

string

at line 77
public string getUnprefixedClassName()

Returns the name of the current class being built.

Return Value

string

at line 762
public addTemporalAccessorComment(string $script, Column $column)

Adds the comment for a temporal accessor.

Parameters

string $script &$script
Column $column

at line 803
public addTemporalAccessorOpen(string $script, Column $column)

Adds the function declaration for a temporal accessor.

Parameters

string $script &$script
Column $column

at line 1085
public addDefaultAccessorComment(string $script, Column $column)

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

Parameters

string $script &$script
Column $column

at line 1108
public addDefaultAccessorOpen(string $script, Column $column)

Adds the function declaration for a default accessor.

Parameters

string $script &$script
Column $column

at line 1307
public addMutatorComment(string $script, Column $column)

Adds the comment for a mutator.

Parameters

string $script &$script
Column $column

at line 1325
public addMutatorOpenOpen(string $script, Column $column)

Adds the mutator function declaration.

Parameters

string $script &$script
Column $column

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

Parameters

$script
Column $col

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

Parameters

$script
Column $col

at line 2964
public string getFKVarName(ForeignKey $fk)

Constructs variable name for fkey-related objects.

Parameters

ForeignKey $fk

Return Value

string

at line 2974
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 2985
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