Propel API
Class

VersionableBehavior

class VersionableBehavior extends Behavior

Keeps tracks of all the modifications in an ActiveRecord object

Methods

setName(string $name)

Sets the name of the Behavior

from Behavior
string getName()

Returns the name of the Behavior

from Behavior
setTable(Table $table)

Sets the table this behavior is applied to

from Behavior
Table getTable()

Returns the table this behavior is applied to

from Behavior
setDatabase(Database $database)

Sets the database this behavior is applied to

from Behavior
Database getDatabase()

Returns the table this behavior is applied to if behavior is applied to <database> element.

from Behavior
addParameter(array $attribute)

Add a parameter Expects an associative array looking like array('name' => 'foo', 'value' => bar)

from Behavior
setParameters(array $parameters)

Overrides the behavior parameters Expects an associative array looking like array('foo' => 'bar')

from Behavior
array getParameters()

Get the associative array of parameters

from Behavior
getParameter($name)

from Behavior
setTableModificationOrder($tableModificationOrder $tableModificationOrder)

Define when this behavior must execute its modifyTable() relative to other behaviors.

from Behavior
integer getTableModificationOrder()

Get when this behavior must execute its modifyTable() relative to other behaviors.

from Behavior
modifyDatabase()

modifyTable()

setTableModified($bool)

from Behavior
isTableModified()

from Behavior
string renderTemplate(string $filename, array $vars = array(), string $templateDir = '/templates/')

Use Propel's simple templating system to render a PHP file using variables passed as arguments.

from Behavior
ColumnMap getColumnForParameter(string $param)

Retrieve a column object using a name stored in the behavior parameters Useful for table behaviors

from Behavior
appendXml(DOMNode $node)

from Behavior
getTableModifier()

from Behavior
getObjectBuilderModifier()

getQueryBuilderModifier()

getPeerBuilderModifier()

getTableMapBuilderModifier()

from Behavior
hasAdditionalBuilders()

from Behavior
getAdditionalBuilders()

from Behavior
addForeignKeyVersionColumns()

getVersionTable()

getVersionTablePhpName()

getVersionableFks()

getVersionableReferrers()

getReferrerIdsColumn(ForeignKey $fk)

getReferrerVersionsColumn(ForeignKey $fk)

Details

in Behavior at line 38
public setName(string $name)

Sets the name of the Behavior

Parameters

string $name the name of the behavior

in Behavior at line 48
public string getName()

Returns the name of the Behavior

Return Value

string

in Behavior at line 58
public setTable(Table $table)

Sets the table this behavior is applied to

Parameters

Table $table the table this behavior is applied to

in Behavior at line 68
public Table getTable()

Returns the table this behavior is applied to

Return Value

Table

in Behavior at line 78
public setDatabase(Database $database)

Sets the database this behavior is applied to

Parameters

Database $database the database this behavior is applied to

in Behavior at line 88
public Database getDatabase()

Returns the table this behavior is applied to if behavior is applied to <database> element.

Return Value

Database

in Behavior at line 99
public addParameter(array $attribute)

Add a parameter Expects an associative array looking like array('name' => 'foo', 'value' => bar)

Parameters

array $attribute associative array with name and value keys

in Behavior at line 111
public setParameters(array $parameters)

Overrides the behavior parameters Expects an associative array looking like array('foo' => 'bar')

Parameters

array $parameters associative array

in Behavior at line 120
public array getParameters()

Get the associative array of parameters

Return Value

array

in Behavior at line 125
public getParameter($name)

Parameters

$name

in Behavior at line 140
public setTableModificationOrder($tableModificationOrder $tableModificationOrder)

Define when this behavior must execute its modifyTable() relative to other behaviors.

The bigger the value, the later the behavior is executed. Default is 50.

Parameters

$tableModificationOrder $tableModificationOrder integer

in Behavior at line 151
public integer getTableModificationOrder()

Get when this behavior must execute its modifyTable() relative to other behaviors.

The bigger the value, the later the behavior is executed. Default is 50.

Return Value

integer

at line 45
public modifyDatabase()

at line 61
public modifyTable()

in Behavior at line 181
public setTableModified($bool)

Parameters

$bool

in Behavior at line 186
public isTableModified()

in Behavior at line 201
public string renderTemplate(string $filename, array $vars = array(), string $templateDir = '/templates/')

Use Propel's simple templating system to render a PHP file using variables passed as arguments.

Parameters

string $filename The template file name, relative to the behavior's dirname
array $vars An associative array of argumens to be rendered
string $templateDir The name of the template subdirectory

Return Value

string The rendered template

in Behavior at line 242
public ColumnMap getColumnForParameter(string $param)

Retrieve a column object using a name stored in the behavior parameters Useful for table behaviors

Parameters

string $param Name of the parameter storing the column name

Return Value

ColumnMap The column of the table supporting the behavior

in Behavior at line 259
public appendXml(DOMNode $node)

Parameters

DOMNode $node

See also

parent::appendXml(DOMNode)

in Behavior at line 273
public getTableModifier()

at line 242
public getObjectBuilderModifier()

at line 251
public getQueryBuilderModifier()

at line 260
public getPeerBuilderModifier()

in Behavior at line 293
public getTableMapBuilderModifier()

in Behavior at line 298
public hasAdditionalBuilders()

in Behavior at line 303
public getAdditionalBuilders()

at line 159
public addForeignKeyVersionColumns()

at line 192
public getVersionTable()

at line 197
public getVersionTablePhpName()

at line 202
public getVersionableFks()

at line 215
public getVersionableReferrers()

at line 228
public getReferrerIdsColumn(ForeignKey $fk)

Parameters

ForeignKey $fk

at line 235
public getReferrerVersionsColumn(ForeignKey $fk)

Parameters

ForeignKey $fk