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($name) | ||
getName() | ||
setTable(Table $table) | ||
getTable() | ||
setDatabase(Database $database) | ||
getDatabase() | ||
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 222
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 33
public
setName($name)
at line 38
public
getName()
at line 43
public
setTable(Table $table)
at line 48
public
getTable()
at line 53
public
setDatabase(Database $database)
at line 58
public
getDatabase()
at line 69
public
addParameter(array $attribute)
Add a parameter Expects an associative array looking like array('name' => 'foo', 'value' => bar)
at line 81
public
setParameters(array $parameters)
Overrides the behavior parameters Expects an associative array looking like array('foo' => 'bar')
at line 90
public array
getParameters()
Get the associative array of parameters
at line 95
public
getParameter($name)
at line 106
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 117
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 127
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 140
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 144
public
setTableModified($bool)
at line 149
public
isTableModified()
at line 164
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 205
public ColumnMap
getColumnForParameter(string $param)
Retrieve a column object using a name stored in the behavior parameters Useful for table behaviors