the constructor
Parameters:
API Tags:
Information Tags:
Throws: | Doctrine_Table_Exception if there is already an instance of this table |
Throws: | Doctrine_Connection_Exception if there are no opened connections |
void addCheckConstraint(
$definition,
$name
)
|
|
addCheckConstraint
adds a check constraint to this table
Parameters:
API Tags:
void addForeignKey(
$definition
)
|
|
addForeignKey
adds a foreignKey to this table
Parameters:
API Tags:
void addIndex(
$index,
$definition
)
|
|
addIndex
adds an index to this table
Parameters:
|
$index: |
|
array |
$definition: |
|
API Tags:
addRecord adds a record to identity map
Parameters:
API Tags:
string applyInheritance(
$where
$where
)
|
|
applyInheritance
Parameters:
$where |
$where: |
query where part to be modified |
API Tags:
Return: | query where part with column aggregation inheritance added |
Access: | public |
void bind(
$args,
$type
)
|
|
Parameters:
API Tags:
clear clears the first level cache (identityMap)
API Tags:
count
API Tags:
Implementation of:
- Countable::count
create creates a new record
Parameters:
$array |
$array: |
an array where keys are field names and values representing field values |
API Tags:
createQuery creates a new Doctrine_Query object and adds the component name of this table as the query 'from' part
API Tags:
mixed enumIndex(
string
$field, mixed
$value
)
|
|
enumIndex
Parameters:
string |
$field: |
|
mixed |
$value: |
|
API Tags:
mixed enumValue(
string
$field, integer
$index
)
|
|
enumValue
Parameters:
string |
$field: |
|
integer |
$index: |
|
API Tags:
export exports this table to database based on column and option definitions
API Tags:
Return: | whether or not the export operation was successful false if table already existed in the database |
Access: | public |
Information Tags:
Throws: | Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation |
void exportConstraints(
)
|
|
exportConstraints exports the constraints of this table into database based on option definitions
API Tags:
Information Tags:
Throws: | Doctrine_Connection_Exception if something went wrong on db level |
finds a record by its identifier
Parameters:
API Tags:
Return: | a record for given database identifier |
Access: | public |
findAll returns a collection of records
API Tags:
void findByDql(
$dql, [
$params = array()]
)
|
|
Parameters:
API Tags:
findByDql finds records with given DQL where clause returns a collection of records
Parameters:
string |
$dql: |
DQL after WHERE clause |
array |
$params: |
query parameters |
API Tags:
string getClassnameToReturn(
)
|
|
Get the classname to return. Most often this is just the options['name']
Check the subclasses option and the inheritanceMap for each subclass to see if all the maps in a subclass is met. If this is the case return that subclass name. If no subclasses match or if there are no subclasses defined return the name of the class for this tables record.
API Tags:
Return: | The name of the class to create |
Access: | public |
Information Tags:
Todo: | this function could use reflection to check the first time it runs if the subclassing option is not set. |
integer getColumnCount(
)
|
|
getColumnCount
API Tags:
Return: | the number of columns in this table |
Access: | public |
string getColumnName(
string
$alias
)
|
|
getColumnName
returns a column name for column alias if the actual name for the alias cannot be found this method returns the given alias
Parameters:
string |
$alias: |
column alias |
API Tags:
Return: | column name |
Access: | public |
returns an array containing all the column names
API Tags:
returns all columns and their definitions
API Tags:
returns internal data, used by Doctrine_Record instances when retrieving data from database
API Tags:
mixed getDefaultValueOf(
string
$column
)
|
|
getDefaultValueOf returns the default value(if any) for given column
Parameters:
API Tags:
mixed getDefinitionOf(
$column
)
|
|
getDefinitionOf
Parameters:
API Tags:
Return: | array on success, false on failure |
Access: | public |
array getEnumValues(
string
$field
)
|
|
Parameters:
API Tags:
array getExportableFormat(
[
$parseForeignKeys = true]
)
|
|
getExportableFormat returns exportable presentation of this object
Parameters:
API Tags:
integer getIdentifierType(
)
|
|
API Tags:
array|boolean getIndex(
$index
)
|
|
getIndex
Parameters:
API Tags:
Return: | array on success, FALSE on failure |
Access: | public |
mixed getOption(
string
$name
)
|
|
getOption returns the value of given option
Parameters:
string |
$name: |
the name of the option |
API Tags:
Return: | the value of given option |
Access: | public |
getOptions returns all options of this table and the associated values
API Tags:
Return: | all options and their values |
Access: | public |
returns all primary keys
API Tags:
void getProxy(
[$id
$id = null]
)
|
|
Parameters:
API Tags:
Information Tags:
Throws: | Doctrine_Find_Exception |
API Tags:
Return: | a Doctrine_Query object |
Access: | public |
getRecord first checks if record exists in identityMap, if not returns a new record
API Tags:
void getRelation(
string
$alias, [
$recursive = true]
)
|
|
getRelation
Parameters:
string |
$alias: |
relation alias |
|
$recursive: |
|
API Tags:
getRelationParser return the relation parser associated with this table
API Tags:
Return: | relation parser object |
Access: | public |
getRelations returns an array containing all relation objects
API Tags:
Return: | an array of Doctrine_Relation objects |
Access: | public |
void getTemplate(
$template
)
|
|
Parameters:
API Tags:
getTemplates returns all templates attached to this table
API Tags:
Return: | an array containing all templates |
Access: | public |
getter for associated tree
API Tags:
Return: | if tree return instance of Doctrine_Tree, otherwise returns false |
Access: | public |
mixed getTypeOf(
$column
)
|
|
getTypeOf
Parameters:
API Tags:
Return: | string on success, false on failure |
Access: | public |
boolean hasColumn(
$name
)
|
|
hasColumn
Parameters:
API Tags:
boolean hasDefaultValues(
)
|
|
hasDefaultValues returns true if this table has default values, otherwise false
API Tags:
boolean hasPrimaryKey(
$key
)
|
|
Parameters:
API Tags:
boolean hasRelation(
string
$alias
)
|
|
hasRelation
Parameters:
string |
$alias: |
the relation to check if exists |
API Tags:
Return: | true if the relation exists otherwise false |
Access: | public |
determine if table acts as tree
API Tags:
Return: | if tree return true, otherwise returns false |
Access: | public |
mixed prepareValue(
string
$field, string
$value
)
|
|
prepareValue this method performs special data preparation depending on the type of the given column
- It unserializes array and object typed columns
- Uncompresses gzip typed columns
- Gets the appropriate enum values for enum typed columns
- Initializes special null object pointer for null values (for fast column existence checking purposes)
example: <code type='php'> $field = 'name'; $value = null; $table->prepareValue($field, $value); // Doctrine_Null </code>
Parameters:
string |
$field: |
the name of the field |
string |
$value: |
field value |
API Tags:
Return: | prepared value |
Access: | public |
Information Tags:
Throws: | Doctrine_Table_Exception if uncompression of gzip typed column fails * |
Throws: | Doctrine_Table_Exception if unserialization of array/object typed column fails or |
void setColumn(
string
$name, string
$type, [integer
$length = null], [mixed
$options = array()]
)
|
|
setColumn
Parameters:
string |
$name: |
|
string |
$type: |
|
integer |
$length: |
|
mixed |
$options: |
|
API Tags:
Information Tags:
Throws: | Doctrine_Table_Exception if trying use wrongly typed parameter |
setData doctrine uses this function internally users are strongly discouraged to use this function
Parameters:
array |
$data: |
internal data |
API Tags:
setOption sets an option and returns this object in order to allow flexible method chaining
Parameters:
string |
$name: |
the name of the option to set |
mixed |
$value: |
the value of the option |
API Tags:
Return: | this object |
See: | Doctrine_Table::$_options for available options |
Access: | public |
void setPrimaryKey(
mixed
$key
)
|
|
Parameters:
API Tags:
void setTableName(
$tableName
)
|
|
Parameters:
API Tags:
void __get(
string
$option
)
|
|
__get an alias for getOption
Parameters:
API Tags:
void __isset(
string
$option
)
|
|
__isset
Parameters:
API Tags:
returns a string representation of this object
API Tags: