class Behavior extends MappingModel
Information about behaviors of a table.
Methods
__construct() | from MappingModel | |
loadMapping(array $attributes)
Loads a mapping definition from an array. |
from MappingModel | |
array |
getAttributes()
Returns all definition attributes. |
from MappingModel |
mixed |
getAttribute(string $name, mixed $default = null)
Returns a particular attribute by a case-insensitive name. |
from MappingModel |
appendXml(DOMNode $node)
Appends DOM elements to represent this object in XML. |
||
VendorInfo |
addVendorInfo(VendorInfo|array $vendor)
Adds a new VendorInfo instance to this current model object. |
from MappingModel |
VendorInfo |
getVendorInfoForType(string $type)
Returns a VendorInfo object by its type. |
from MappingModel |
string |
getConfiguredBehavior(string $behavior)
Returns the best class name for a given behavior. |
from MappingModel |
string |
toString()
String representation of the current object. |
from MappingModel |
string |
__toString()
String representation of the current object. |
from MappingModel |
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 a database element. |
|
addParameter(array $parameter)
Adds a single parameter. |
||
setParameters(array $parameters)
Overrides the behavior parameters. |
||
array |
getParameters()
Returns the associative array of parameters. |
|
array |
getParameter(string $name)
Returns a single parameter by its name. |
|
setTableModificationOrder(integer $tableModificationOrder)
Defines when this behavior must execute its modifyTable() method relative to other behaviors. |
||
integer |
getTableModificationOrder()
Returns when this behavior must execute its modifyTable() method relative to other behaviors. |
|
modifyDatabase()
This method is automatically called on database behaviors when the database model is finished. |
||
modifyTable()
This method is automatically called on table behaviors when the database model is finished. |
||
setTableModified(boolean $modified)
Sets whether or not the table has been modified. |
||
boolean |
isTableModified()
Returns whether or not the table has been modified. |
|
string |
renderTemplate(string $filename, array $vars = array(), string $templateDir = '/templates/')
Use Propel simple templating system to render a PHP file using variables passed as arguments. |
|
Column |
getColumnForParameter(string $name)
Returns a column object using a name stored in the behavior parameters. |
|
Behavior |
getTableModifier()
Returns the table modifier object. |
|
Behavior |
getObjectBuilderModifier()
Returns the object builder modifier object. |
|
Behavior |
getQueryBuilderModifier()
Returns the query builder modifier object. |
|
Behavior |
getTableMapBuilderModifier()
Returns the table map builder modifier object. |
|
boolean |
hasAdditionalBuilders()
Returns whether or not this behavior has additional builders. |
|
array |
getAdditionalBuilders()
Returns the list of additional builder objects. |
Details
in MappingModel at line 27
public
__construct()
in MappingModel at line 38
public
loadMapping(array $attributes)
Loads a mapping definition from an array.
in MappingModel at line 58
public array
getAttributes()
Returns all definition attributes.
All attribute names (keys) are lowercase.
in MappingModel at line 73
public mixed
getAttribute(string $name, mixed $default = null)
Returns a particular attribute by a case-insensitive name.
If the attribute is not set, then the second default value is
returned instead.
at line 280
public
appendXml(DOMNode $node)
Appends DOM elements to represent this object in XML.
in MappingModel at line 138
public VendorInfo
addVendorInfo(VendorInfo|array $vendor)
Adds a new VendorInfo instance to this current model object.
in MappingModel at line 158
public VendorInfo
getVendorInfoForType(string $type)
Returns a VendorInfo object by its type.
in MappingModel at line 176
public string
getConfiguredBehavior(string $behavior)
Returns the best class name for a given behavior.
If not found, the method tries to autoload \Propel\Generator\Behavior\[Bname]\[Bname]Behavior
in MappingModel at line 198
public string
toString()
String representation of the current object.
in MappingModel at line 213
public string
__toString()
String representation of the current object.
at line 37
public
setName(string $name)
Sets the name of the Behavior
at line 47
public string
getName()
Returns the name of the Behavior
at line 57
public
setTable(Table $table)
Sets the table this behavior is applied to
at line 67
public Table
getTable()
Returns the table this behavior is applied to
at line 77
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 a database element.
at line 101
public
addParameter(array $parameter)
Adds a single parameter.
Expects an associative array looking like
array('name' => 'foo', 'value' => bar)
at line 114
public
setParameters(array $parameters)
Overrides the behavior parameters.
Expects an associative array looking like array('foo' => 'bar').
at line 124
public array
getParameters()
Returns the associative array of parameters.
at line 135
public array
getParameter(string $name)
Returns a single parameter by its name.
at line 149
public
setTableModificationOrder(integer $tableModificationOrder)
Defines when this behavior must execute its modifyTable() method relative to other behaviors.
The bigger the value is, the later the
behavior is executed.
Default is 50.
at line 163
public integer
getTableModificationOrder()
Returns when this behavior must execute its modifyTable() method relative to other behaviors.
The bigger the value is, the later the behavior is
executed.
Default is 50.
at line 175
public
modifyDatabase()
This method is automatically called on database behaviors when the database model is finished.
Propagates the behavior to the tables of the database and override this
method to have a database behavior do something special.
at line 192
public
modifyTable()
This method is automatically called on table behaviors when the database model is finished.
It also override it to add columns to the current
table.
at line 202
public
setTableModified(boolean $modified)
Sets whether or not the table has been modified.
at line 212
public boolean
isTableModified()
Returns whether or not the table has been modified.
at line 227
public string
renderTemplate(string $filename, array $vars = array(), string $templateDir = '/templates/')
Use Propel simple templating system to render a PHP file using variables passed as arguments.
The template file name is relative to the behavior's
directory name.
at line 270
public Column
getColumnForParameter(string $name)
Returns a column object using a name stored in the behavior parameters.
Useful for table behaviors.
at line 301
public Behavior
getTableModifier()
Returns the table modifier object.
The current object is returned by default.
at line 313
public Behavior
getObjectBuilderModifier()
Returns the object builder modifier object.
The current object is returned by default.
at line 325
public Behavior
getQueryBuilderModifier()
Returns the query builder modifier object.
The current object is returned by default.
at line 337
public Behavior
getTableMapBuilderModifier()
Returns the table map builder modifier object.
The current object is returned by default.
at line 347
public boolean
hasAdditionalBuilders()
Returns whether or not this behavior has additional builders.
at line 357
public array
getAdditionalBuilders()
Returns the list of additional builder objects.