Class:Doctrine_Record_Abstract - Superclass: Doctrine_Access Class:Doctrine_Access - Superclass: Doctrine_Locator_Injectable Doctrine_Locator_Injectable
⌊ Doctrine_Access
⌊ Doctrine_Record_Abstract
public abstract class Doctrine_Record_Abstract
extends Doctrine_Access
www.doctrine-project.org| Field Summary | |
|---|---|
| protected mixed | . |
| Method Summary | |
|---|---|
| Doctrine_Record | actAs(mixed tpl, array options) Loads the given plugin. |
| Doctrine_Record | addListener(Doctrine_EventListener_Interface|Doctrine_Overloadable listener, mixed name) addListener. |
| mixed | attribute(mixed attr, mixed value) attribute sets or retrieves an option. |
| Doctrine_Record | bindQueryParts(array queryParts) bindQueryParts binds query parts to given component. |
| Doctrine_Record | check(mixed constraint, string name) Adds a check constraint. |
| Doctrine_EventListener_Interface|Doctrine_Overloadable | getListener. |
| Doctrine_Table | getTable() getTable returns the associated table object. |
| void | hasColumn(string name, string type, integer length, mixed options) Sets a column definition. |
| void | hasColumns(array definitions) Set multiple column definitions at once. |
| Doctrine_Record | hasMany(string componentName, string options) Binds One-to-Many / Many-to-Many aggregate relation. |
| Doctrine_Record | hasOne(string componentName, string options) Binds One-to-One aggregate relation. |
| mixed | index(string name, array definition) index defines or retrieves an index if the second parameter is set this method defines an index if not this method retrieves index named $name. |
| void | loadGenerator(mixed generator) |
| mixed | option(mixed name, mixed value) option sets or retrieves an option. |
| void | setAttribute(mixed attr, mixed value) |
| void | setColumnOption(string columnName, string option, string value) Set an individual column option. |
| void | setColumnOptions(mixed name, mixed options, string columnName, array validators) Customize the array of options for a column or multiple columns. |
| void | setInheritanceMap(mixed map) |
| Doctrine_Record | setListener(Doctrine_EventListener_Interface|Doctrine_Overloadable listener) setListener. |
| void | setSubclasses(mixed map) |
| void | |
| void | setTableName(mixed tableName) |
| void | setUp() |
| void | unique(array fields, array options, bool createUniqueIndex) Defines a n-uple of fields that must be unique for every record. |
| Methods inherited from Doctrine\Doctrine_Access | |
|---|---|
| add, contains, get, offsetExists, offsetGet, offsetSet, offsetUnset, remove, set, setArray | |
| Methods inherited from Doctrine\Doctrine_Locator_Injectable | |
|---|---|
| bind, getLocator, getNullObject, initNullObject, locate, setLocator | |
protected mixed $_table
public Doctrine_Record actAs(mixed tpl, array options)
Loads the given plugin.
This method loads a behavior in the record. It will add the behavior also to the record table if it. It is tipically called in @see setUp().
public Doctrine_Record addListener(Doctrine_EventListener_Interface|Doctrine_Overloadable listener, mixed name)
addListener
public mixed attribute(mixed attr, mixed value)
attribute sets or retrieves an option
public Doctrine_Record bindQueryParts(array queryParts)
bindQueryParts binds query parts to given component
public Doctrine_Record check(mixed constraint, string name)
Adds a check constraint.
This method will add a CHECK constraint to the record table.
public Doctrine_EventListener_Interface|Doctrine_Overloadable getListener()
getListener
public Doctrine_Table getTable()
getTable returns the associated table object
public void hasColumn(string name, string type, integer length, mixed options)
Sets a column definition
public void hasColumns(array definitions)
Set multiple column definitions at once
public Doctrine_Record hasMany(string componentName, string options)
Binds One-to-Many / Many-to-Many aggregate relation
public Doctrine_Record hasOne(string componentName, string options)
Binds One-to-One aggregate relation
public mixed index(string name, array definition)
index defines or retrieves an index if the second parameter is set this method defines an index if not this method retrieves index named $name
public void loadGenerator(mixed generator)
public mixed option(mixed name, mixed value)
option sets or retrieves an option
public void setAttribute(mixed attr, mixed value)
public void setColumnOption(string columnName, string option, string value)
Set an individual column option
public void setColumnOptions(mixed name, mixed options, string columnName, array validators)
Customize the array of options for a column or multiple columns. First argument can be a single field/column name or an array of them. The second argument is an array of options.
[php] public function setTableDefinition() { parent::setTableDefinition(); $this->setColumnOptions('username', array( 'unique' => true )); }
public void setInheritanceMap(mixed map)
public Doctrine_Record setListener(Doctrine_EventListener_Interface|Doctrine_Overloadable listener)
setListener
public void setSubclasses(mixed map)
public void setTableDefinition()
public void setTableName(mixed tableName)
public void setUp()
public void unique(array fields, array options, bool createUniqueIndex)
Defines a n-uple of fields that must be unique for every record.
This method Will automatically add UNIQUE index definition and validate the values on save. The UNIQUE index is not created in the database until you use @see export().
Doctrine_Record_Abstract