class Behavior extends XMLElement
Information about behaviors of a table.
Methods
loadFromXML(array $attributes)
This is the entry point method for loading data from XML. |
from XMLElement | |
array |
getAttributes()
Returns the assoc array of attributes. |
from XMLElement |
mixed |
getAttribute(string $name, mixed $defaultValue = null)
Gets a particular attribute by [case-insensitive] name. |
from XMLElement |
appendXml(DOMNode $node) | ||
VendorInfo |
addVendorInfo(mixed $data)
Sets an associated VendorInfo object. |
from XMLElement |
VendorInfo |
getVendorInfoForType($type)
Gets the any associated VendorInfo object. |
from XMLElement |
string |
getConfiguredBehavior(string $bname)
Find the best class name for a given behavior Looks in build.properties for path like propel.behavior.[bname].class If not found, tries to autoload [Bname]Behavior If no success, returns 'Behavior' |
from XMLElement |
toString()
String representation of the current object. |
from XMLElement | |
__toString()
Magic string method |
from XMLElement | |
setName(string $name)
Sets the name of the Behavior |
||
string |
getName()
Returns the name of the Behavior |
|
setTable(Table $table)
Sets the table this behavior is applied to |
||
Table |
getTable()
Returns the table this behavior is applied to |
|
setDatabase(Database $database)
Sets the database this behavior is applied to |
||
Database |
getDatabase()
Returns the table this behavior is applied to if behavior is applied to <database> element. |
|
addParameter(array $attribute)
Add a parameter Expects an associative array looking like array('name' => 'foo', 'value' => bar) |
||
setParameters(array $parameters)
Overrides the behavior parameters Expects an associative array looking like array('foo' => 'bar') |
||
array |
getParameters()
Get the associative array of parameters |
|
getParameter($name) | ||
setTableModificationOrder($tableModificationOrder $tableModificationOrder)
Define when this behavior must execute its modifyTable() relative to other behaviors. |
||
integer |
getTableModificationOrder()
Get when this behavior must execute its modifyTable() relative to other behaviors. |
|
modifyDatabase()
This method is automatically called on database behaviors when the database model is finished Propagate the behavior to the tables of the database Override this method to have a database behavior do something special |
||
modifyTable()
This method is automatically called on table behaviors when the database model is finished Override it to add columns to the current table |
||
setTableModified($bool) | ||
isTableModified() | ||
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. |
|
ColumnMap |
getColumnForParameter(string $param)
Retrieve a column object using a name stored in the behavior parameters Useful for table behaviors |
|
getTableModifier() | ||
getObjectBuilderModifier() | ||
getQueryBuilderModifier() | ||
getPeerBuilderModifier() | ||
getTableMapBuilderModifier() | ||
hasAdditionalBuilders() | ||
getAdditionalBuilders() |
Details
in XMLElement at line 47
public
loadFromXML(array $attributes)
This is the entry point method for loading data from XML.
It calls a setupObject() method that must be implemented by the child class.
in XMLElement at line 58
public array
getAttributes()
Returns the assoc array of attributes.
All attribute names (keys) are lowercase.
in XMLElement at line 70
public mixed
getAttribute(string $name, mixed $defaultValue = null)
Gets a particular attribute by [case-insensitive] name.
If attribute is not set then the $defaultValue is returned.
at line 255
public
appendXml(DOMNode $node)
in XMLElement at line 106
public VendorInfo
addVendorInfo(mixed $data)
Sets an associated VendorInfo object.
in XMLElement at line 123
public VendorInfo
getVendorInfoForType($type)
Gets the any associated VendorInfo object.
in XMLElement at line 142
public string
getConfiguredBehavior(string $bname)
Find the best class name for a given behavior Looks in build.properties for path like propel.behavior.[bname].class If not found, tries to autoload [Bname]Behavior If no success, returns 'Behavior'
in XMLElement at line 165
public
toString()
String representation of the current object.
This is an xml representation with the XML declaration removed.
in XMLElement at line 178
public
__toString()
Magic string method
at line 38
public
setName(string $name)
Sets the name of the Behavior
at line 48
public string
getName()
Returns the name of the Behavior
at line 58
public
setTable(Table $table)
Sets the table this behavior is applied to
at line 68
public Table
getTable()
Returns the table this behavior is applied to
at line 78
public
setDatabase(Database $database)
Sets the database this behavior is applied to
at line 88
public Database
getDatabase()
Returns the table this behavior is applied to if behavior is applied to <database> element.
at line 99
public
addParameter(array $attribute)
Add a parameter Expects an associative array looking like array('name' => 'foo', 'value' => bar)
at line 111
public
setParameters(array $parameters)
Overrides the behavior parameters Expects an associative array looking like array('foo' => 'bar')
at line 120
public array
getParameters()
Get the associative array of parameters
at line 125
public
getParameter($name)
at line 136
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.
at line 147
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.
at line 157
public
modifyDatabase()
This method is automatically called on database behaviors when the database model is finished Propagate the behavior to the tables of the database Override this method to have a database behavior do something special
at line 173
public
modifyTable()
This method is automatically called on table behaviors when the database model is finished Override it to add columns to the current table
at line 177
public
setTableModified($bool)
at line 182
public
isTableModified()
at line 197
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.
at line 238
public ColumnMap
getColumnForParameter(string $param)
Retrieve a column object using a name stored in the behavior parameters Useful for table behaviors