Classes:
Doctrine
Doctrine_Access
Doctrine_Adapter
Doctrine_Adapter_Db2_Exception
Doctrine_Adapter_Exception
Doctrine_Adapter_Statement
Doctrine_AuditLog
Doctrine_AuditLog_Listener
Doctrine_Collection
Doctrine_Collection_Exception
Doctrine_Collection_Iterator
Doctrine_Collection_Iterator_Expandable
Doctrine_Collection_Iterator_Normal
Doctrine_Collection_Iterator_Offset
Doctrine_Collection_Offset
Doctrine_Column
Doctrine_Compiler
Doctrine_Compiler_Exception
Doctrine_Configurable
Doctrine_Connection
Doctrine_Connection_Common
Doctrine_Connection_Db2
Doctrine_Connection_Exception
Doctrine_Connection_Firebird
Doctrine_Connection_Firebird_Exception
Doctrine_Connection_Informix
Doctrine_Connection_Informix_Exception
Doctrine_Connection_Mock
Doctrine_Connection_Module
Doctrine_Connection_Mssql
Doctrine_Connection_Mssql_Exception
Doctrine_Connection_Mysql
Doctrine_Connection_Mysql_Exception
Doctrine_Connection_Oracle
Doctrine_Connection_Oracle_Exception
Doctrine_Connection_Pgsql
Doctrine_Connection_Pgsql_Exception
Doctrine_Connection_Profiler
Doctrine_Connection_Profiler_Exception
Doctrine_Connection_Sqlite
Doctrine_Connection_Sqlite_Exception
Doctrine_Connection_Statement
Doctrine_Connection_UnitOfWork
Doctrine_DataDict
Doctrine_DataDict_Exception
Doctrine_DataDict_Informix
Doctrine_DataType
Doctrine_Db
Doctrine_Event
Doctrine_EventListener
Doctrine_EventListener_Chain
Doctrine_EventListener_Exception
Doctrine_Exception
Doctrine_Export
Doctrine_Export_Exception
Doctrine_Export_Firebird
Doctrine_Export_Frontbase
Doctrine_Export_Mssql
Doctrine_Export_Mysql
Doctrine_Export_Oracle
Doctrine_Export_Pgsql
Doctrine_Export_Reporter
Doctrine_Export_Schema
Doctrine_Export_Schema_Xml
Doctrine_Export_Schema_Yml
Doctrine_Export_Sqlite
Doctrine_Expression
Doctrine_Expression_Driver
Doctrine_Expression_Exception
Doctrine_Expression_Firebird
Doctrine_Expression_Informix
Doctrine_Expression_Mock
Doctrine_Expression_Mssql
Doctrine_Expression_Mysql
Doctrine_Expression_Oracle
Doctrine_Expression_Pgsql
Doctrine_Expression_Sqlite
Doctrine_File
Doctrine_File_Index
Doctrine_Formatter
Doctrine_Hook
Doctrine_Hook_Equal
Doctrine_Hook_Integer
Doctrine_Hook_Parser
Doctrine_Hook_Parser_Complex
Doctrine_Hook_WordLike
Doctrine_Hydrate
Doctrine_Hydrate_Array
Doctrine_Hydrate_Exception
Doctrine_Hydrate_Record
Doctrine_Import
Doctrine_Import_Builder
Doctrine_Import_Builder_BaseClass
Doctrine_Import_Builder_Exception
Doctrine_Import_Exception
Doctrine_Import_Firebird
Doctrine_Import_Informix
Doctrine_Import_Mssql
Doctrine_Import_Mysql
Doctrine_Import_Oracle
Doctrine_Import_Pgsql
Doctrine_Import_Reader
Doctrine_Import_Reader_Db
Doctrine_Import_Reader_Exception
Doctrine_Import_Reader_Xml_Propel
Doctrine_Import_Schema
Doctrine_Import_Schema_Xml
Doctrine_Import_Schema_Yml
Doctrine_Import_Sqlite
Doctrine_IntegrityMapper
Doctrine_Lib
Doctrine_Locking_Exception
Doctrine_Locking_Manager_Pessimistic
Doctrine_Manager
Doctrine_Manager_Exception
Doctrine_Node
Doctrine_Node_AdjacencyList
Doctrine_Node_AdjacencyList_LevelOrderIterator
Doctrine_Node_AdjacencyList_PostOrderIterator
Doctrine_Node_AdjacencyList_PreOrderIterator
Doctrine_Node_Exception
Doctrine_Node_MaterializedPath
Doctrine_Node_MaterializedPath_LevelOrderIterator
Doctrine_Node_MaterializedPath_PostOrderIterator
Doctrine_Node_MaterializedPath_PreOrderIterator
Doctrine_Node_NestedSet
Doctrine_Node_NestedSet_LevelOrderIterator
Doctrine_Node_NestedSet_PostOrderIterator
Doctrine_Node_NestedSet_PreOrderIterator
Doctrine_Null
Doctrine_Object
Doctrine_Plugin
Doctrine_Query
Doctrine_Query_Abstract
Doctrine_Query_Check
Doctrine_Query_Condition
Doctrine_Query_Exception
Doctrine_Query_Filter
Doctrine_Query_Filter_Chain
Doctrine_Query_From
Doctrine_Query_Groupby
Doctrine_Query_Having
Doctrine_Query_JoinCondition
Doctrine_Query_Limit
Doctrine_Query_Offset
Doctrine_Query_Orderby
Doctrine_Query_Parser
Doctrine_Query_Part
Doctrine_Query_Select
Doctrine_Query_Set
Doctrine_Query_Where
Doctrine_RawSql
Doctrine_RawSql_Exception
Doctrine_Record
Doctrine_Record_Abstract
Doctrine_Record_Exception
Doctrine_Record_Filter
Doctrine_Record_Iterator
Doctrine_Record_Listener
Doctrine_Record_Listener_Chain
Doctrine_Record_State_Exception
Doctrine_Relation
Doctrine_Relation_Association
Doctrine_Relation_Association_Self
Doctrine_Relation_Exception
Doctrine_Relation_ForeignKey
Doctrine_Relation_LocalKey
Doctrine_Relation_Nest
Doctrine_Relation_Parser
Doctrine_Relation_Parser_Exception
Doctrine_Schema
Doctrine_Schema_Column
Doctrine_Schema_Database
Doctrine_Schema_Exception
Doctrine_Schema_Object
Doctrine_Schema_Relation
Doctrine_Schema_Table
Doctrine_Search
Doctrine_Search_Analyzer
Doctrine_Search_Analyzer_Exception
Doctrine_Search_Analyzer_Standard
Doctrine_Search_Exception
Doctrine_Search_Indexer
Doctrine_Search_Indexer_Dir
Doctrine_Search_Indexer_Exception
Doctrine_Search_Listener
Doctrine_Search_Parser
Doctrine_Search_Query
Doctrine_Search_Record
Doctrine_Search_Scorer
Doctrine_Search_Template
Doctrine_Sequence
Doctrine_Sequence_Db2
Doctrine_Sequence_Exception
Doctrine_Sequence_Firebird
Doctrine_Sequence_Informix
Doctrine_Sequence_Mssql
Doctrine_Sequence_Mysql
Doctrine_Sequence_Oracle
Doctrine_Sequence_Pgsql
Doctrine_Sequence_Sqlite
Doctrine_Table
Doctrine_Table_Exception
Doctrine_Table_Repository
Doctrine_Table_Repository_Exception
Doctrine_Template
Doctrine_Template_NestedSet
Doctrine_Template_Searchable
Doctrine_Template_Taggable
Doctrine_Template_Versionable
Doctrine_Tokenizer
Doctrine_Transaction
Doctrine_Transaction_Exception
Doctrine_Transaction_Firebird
Doctrine_Transaction_Informix
Doctrine_Transaction_Mock
Doctrine_Transaction_Mssql
Doctrine_Transaction_Mysql
Doctrine_Transaction_Oracle
Doctrine_Transaction_Pgsql
Doctrine_Transaction_Sqlite
Doctrine_Tree
Doctrine_Tree_AdjacencyList
Doctrine_Tree_Exception
Doctrine_Tree_MaterializedPath
Doctrine_Tree_NestedSet
Doctrine_Util
Doctrine_Validator
Doctrine_Validator_Country
Doctrine_Validator_Creditcard
Doctrine_Validator_Date
Doctrine_Validator_Email
Doctrine_Validator_Enum
Doctrine_Validator_ErrorStack
Doctrine_Validator_Exception
Doctrine_Validator_HtmlColor
Doctrine_Validator_Ip
Doctrine_Validator_Minlength
Doctrine_Validator_Nospace
Doctrine_Validator_Notblank
Doctrine_Validator_Notnull
Doctrine_Validator_Range
Doctrine_Validator_Regexp
Doctrine_Validator_Unique
Doctrine_Validator_Unsigned
Doctrine_Validator_Usstate
Doctrine_View
Doctrine_View_Exception
Doctrine_Cache
Doctrine_Cache
Doctrine_Cache_Apc
Doctrine_Cache_Array
Doctrine_Cache_Db
Doctrine_Cache_Driver
Doctrine_Cache_Exception
Doctrine_Cache_Memcache
Doctrine_Adapter
Doctrine_Adapter_Db2
Doctrine_Adapter_Mock
Doctrine_Adapter_Mysqli
Doctrine_Adapter_Oracle
Doctrine_Adapter_Statement_Mock
Doctrine_DataDict
Doctrine_DataDict_Firebird
Doctrine_DataDict_Mssql
Doctrine_DataDict_Mysql
Doctrine_DataDict_Oracle
Doctrine_DataDict_Pgsql
Doctrine_DataDict_Sqlite

# Class: Doctrine_Table

Source Location: /Doctrine/Table.php

## Class Doctrine_Table

Class Overview

Implements interfaces: Countable (internal interface) Doctrine_Table represents a database table each Doctrine_Table holds the information of foreignKeys and associations Located in /Doctrine/Table.php [line 34]
    Doctrine_Object
       |
       --Doctrine_Configurable
          |
          --Doctrine_Table
Author(s): Konsta Vesterinen <kvesteri@cc.hut.fi> Information Tags:
Version: | $Revision: 2279 $
Link: | www.phpdoctrine.com
Since: | 1.0
License: | LGPL
| Properties $columnAliases $columnCount $columns $conn $data $hasDefaultValues $identifier $identifierType $identityMap $options $primaryKeys $repository $tree $_parser $_templates | Methods __construct addCheckConstraint addForeignKey addIndex addRecord addTemplate applyInheritance bind clear count create createQuery enumIndex enumValue export exportConstraints find findAll findByDql findBySql getClassnameToReturn getColumnCount getColumnName getColumnNames getColumns getComponentName getConnection getData getDefaultValueOf getDefinitionOf getEnumValues getExportableFormat getIdentifier getIdentifierType getIndex getOption getOptions getPrimaryKeys getProxy getQueryObject getRecord getRelation getRelationParser getRelations getRepository getTableName getTemplate getTemplates getTree getTypeOf hasColumn hasDefaultValues hasPrimaryKey hasRelation isTree prepareValue setColumn setData setOption setPrimaryKey setTableName __get __isset __toString

[ Top ]
Inherited Properties, Constants, and Methods

Inherited Properties | Inherited Methods | Inherited Constants
--- | --- | ---
Inherited From Doctrine_Configurable Doctrine_Configurable::$attributes Doctrine_Configurable::$parent Doctrine_Configurable::$_impl Inherited From Doctrine_Object Doctrine_Object::$_null | Inherited From Doctrine_Configurable Doctrine_Configurable::addListener() addListener Doctrine_Configurable::addRecordListener() addRecordListener Doctrine_Configurable::getAttribute() returns the value of an attribute Doctrine_Configurable::getAttributes() getAttributes returns all attributes as an array Doctrine_Configurable::getCacheDriver() getCacheDriver Doctrine_Configurable::getImpl() getImpl returns the implementation for given class Doctrine_Configurable::getListener() getListener Doctrine_Configurable::getParent() getParent returns the parent of this component Doctrine_Configurable::getRecordListener() getListener Doctrine_Configurable::setAttribute() setAttribute sets a given attribute Doctrine_Configurable::setEventListener() Doctrine_Configurable::setImpl() setImpl binds given class to given template name Doctrine_Configurable::setListener() setListener Doctrine_Configurable::setParent() sets a parent for this configurable component the parent must be configurable component itself Doctrine_Configurable::setRecordListener() setListener Inherited From Doctrine_Object Doctrine_Object::getNullObject() getNullObject returns the null object associated with this object Doctrine_Object::initNullObject() initNullObject initializes the null object |

[ Top ]
Property Summary

array | $columnAliases |
integer | $columnCount |
array | $columns |
Doctrine_Connection | $conn |
array | $data |
boolean | $hasDefaultValues |
mixed | $identifier |
integer | $identifierType |
array | $identityMap |
array | $options |
array | $primaryKeys |
Doctrine_Table_Repository | $repository |
Doctrine_Tree | $tree |
Doctrine_Relation_Parser | $_parser |
array | $_templates |

[ Top ]
Method Summary

void | __construct() | the constructor
void | addCheckConstraint() | addCheckConstraint
void | addForeignKey() | addForeignKey
void | addIndex() | addIndex
boolean | addRecord() | addRecord adds a record to identity map
void | addTemplate() |
string | applyInheritance() | applyInheritance
void | bind() |
void | clear() | clear clears the first level cache (identityMap)
integer | count() | count
Doctrine_Record | create() | create creates a new record
Doctrine_Query | createQuery() | createQuery creates a new Doctrine_Query object and adds the component name of this table as the query 'from' part
mixed | enumIndex() | enumIndex
mixed | enumValue() | enumValue
boolean | export() | export exports this table to database based on column and option definitions
void | exportConstraints() | exportConstraints exports the constraints of this table into database based on option definitions
Doctrine_Record|false | find() | finds a record by its identifier
Doctrine_Collection | findAll() | findAll returns a collection of records
void | findByDql() |
Doctrine_Collection | findBySql() | findByDql finds records with given DQL where clause returns a collection of records
string | getClassnameToReturn() | Get the classname to return. Most often this is just the options['name']
integer | getColumnCount() | getColumnCount
string | getColumnName() | getColumnName
array | getColumnNames() | returns an array containing all the column names
array | getColumns() | returns all columns and their definitions
void | getComponentName() |
Doctrine_Connection | getConnection() |
array | getData() | returns internal data, used by Doctrine_Record instances when retrieving data from database
mixed | getDefaultValueOf() | getDefaultValueOf returns the default value(if any) for given column
mixed | getDefinitionOf() | getDefinitionOf
array | getEnumValues() |
array | getExportableFormat() | getExportableFormat returns exportable presentation of this object
mixed | getIdentifier() |
integer | getIdentifierType() |
array|boolean | getIndex() | getIndex
mixed | getOption() | getOption returns the value of given option
array | getOptions() | getOptions returns all options of this table and the associated values
array | getPrimaryKeys() | returns all primary keys
void | getProxy() |
Doctrine_Query | getQueryObject() |
Doctrine_Record | getRecord() | getRecord first checks if record exists in identityMap, if not returns a new record
void | getRelation() | getRelation
Doctrine_Relation_Parser | getRelationParser() | getRelationParser return the relation parser associated with this table
array | getRelations() | getRelations returns an array containing all relation objects
Doctrine_Table_Repository | getRepository() | getRepository
void | getTableName() |
void | getTemplate() |
array | getTemplates() | getTemplates returns all templates attached to this table
mixed | getTree() | getter for associated tree
mixed | getTypeOf() | getTypeOf
boolean | hasColumn() | hasColumn
boolean | hasDefaultValues() | hasDefaultValues returns true if this table has default values, otherwise false
boolean | hasPrimaryKey() |
boolean | hasRelation() | hasRelation
mixed | isTree() | determine if table acts as tree
mixed | prepareValue() | prepareValue this method performs special data preparation depending on the type of the given column
void | setColumn() | setColumn
void | setData() | setData doctrine uses this function internally users are strongly discouraged to use this function
Doctrine_Table | setOption() | setOption sets an option and returns this object in order to allow flexible method chaining
void | setPrimaryKey() |
void | setTableName() |
void | __get() | __get an alias for getOption
void | __isset() | __isset
string | __toString() | returns a string representation of this object

[ Top ]
Properties
array $columnAliases = array() [line 85]
API Tags:

Access: | protected

[ Top ]
integer $columnCount [line 90]
API Tags:

Access: | private

[ Top ]
array $columns = array() [line 80]
API Tags:

Access: | protected

[ Top ]
Doctrine_Connection $conn [line 56]
API Tags:

Access: | private

[ Top ]
array $data = array() [line 39]
API Tags:

Access: | private

[ Top ]
boolean $hasDefaultValues [line 94]
API Tags:

Access: | private

[ Top ]
mixed $identifier [line 47]
API Tags:

Access: | private

[ Top ]
integer $identifierType [line 52]
API Tags:

See: | Doctrine_Identifier constants
Access: | private

[ Top ]
array $identityMap = array() [line 60]
API Tags:

Access: | private

[ Top ]
array $options = array('name' => null,
'tableName' => null,
'sequenceName' => null,
'inheritanceMap' => array(),'enumMap'=>array(),'engine'=>null,'charset'=>null,'collation'=>null,'treeImpl'=>null,'treeOptions'=>null,'indexes'=>array(),'parents'=>array(),'versioning'=>null,) [line 136]
API Tags:

Access: | protected

[ Top ]
array $primaryKeys = array() [line 43]
API Tags:

Access: | private

[ Top ]
Doctrine_Table_Repository $repository [line 64]
API Tags:

Access: | private

[ Top ]
Doctrine_Tree $tree [line 153]
API Tags:

Access: | protected

[ Top ]
Doctrine_Relation_Parser $_parser [line 157]
API Tags:

Access: | protected

[ Top ]
array $_templates [line 161]
API Tags:

Access: | protected

[ Top ]
Methods
Constructor __construct [line 170]

`void __construct( $name, Doctrine_Connection $conn )`

the constructor

Parameters:

| $name: |
Doctrine_Connection | $conn: |

API Tags:

Access: | public

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

[ Top ]
addCheckConstraint [line 488]

`void addCheckConstraint( $definition, $name )`

addCheckConstraint

adds a check constraint to this table

Parameters:

| $definition: |
| $name: |

API Tags:

Access: | public

[ Top ]
addForeignKey [line 477]

`void addForeignKey( $definition )`

addForeignKey

adds a foreignKey to this table

Parameters:

array | $definition: |

API Tags:

Access: | public

[ Top ]
addIndex [line 505]

`void addIndex( $index, $definition )`

addIndex

adds an index to this table

Parameters:

| $index: |
array | $definition: |

API Tags:

Access: | public

[ Top ]
addRecord [line 944]

`boolean addRecord( Doctrine_Record $record )`

addRecord adds a record to identity map

Parameters:

Doctrine_Record | $record: | record to be added

API Tags:

Access: | public

[ Top ]
addTemplate [line 1315]

`void addTemplate( $template, Doctrine_Template $impl )`

Parameters:

| $template: |
Doctrine_Template | $impl: |

API Tags:

Access: | public

[ Top ]
applyInheritance [line 885]

`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

[ Top ]
bind [line 522]

`void bind( $args, $type )`

Parameters:

| $args: |
| $type: |

API Tags:

Access: | public

[ Top ]
clear [line 933]

`void clear( )`

clear clears the first level cache (identityMap)

API Tags:

Access: | public

[ Top ]
count [line 1075]

`integer count( )`

count

API Tags:

Access: | public

Implementation of:

Countable::count

[ Top ]
create [line 846]

`Doctrine_Record create( [ $array = array()] )`

create creates a new record

Parameters:

$array | $array: | an array where keys are field names and values representing field values

API Tags:

Access: | public

[ Top ]
createQuery [line 604]

`Doctrine_Query createQuery( )`

createQuery creates a new Doctrine_Query object and adds the component name of this table as the query 'from' part

API Tags:

Access: | public

[ Top ]
enumIndex [line 1122]

`mixed enumIndex( string $field, mixed $value )`

enumIndex

Parameters:

string | $field: |
mixed | $value: |

API Tags:

Access: | public

[ Top ]
enumValue [line 1108]

`mixed enumValue( string $field, integer $index )`

enumValue

Parameters:

string | $field: |
integer | $index: |

API Tags:

Access: | public

[ Top ]
export [line 316]

`boolean export( )`

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

[ Top ]
exportConstraints [line 413]

`void exportConstraints( )`

exportConstraints exports the constraints of this table into database based on option definitions

API Tags:

Access: | public

Information Tags:

Throws: | Doctrine_Connection_Exception if something went wrong on db level

[ Top ]
find [line 858]

`Doctrine_Record|false find( $id $id )`

finds a record by its identifier

Parameters:

$id | $id: | database row id

API Tags:

Return: | a record for given database identifier
Access: | public

[ Top ]
findAll [line 903]

`Doctrine_Collection findAll( )`

findAll returns a collection of records

API Tags:

Access: | public

[ Top ]
findByDql [line 924]

`void findByDql( $dql, [ $params = array()] )`

Parameters:

| $dql: |
array | $params: |

API Tags:

Access: | public

[ Top ]
findBySql [line 918]

`Doctrine_Collection findBySql( string $dql, [ $params = array()] )`

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:

Access: | public

[ Top ]
getClassnameToReturn [line 1027]

`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.

[ Top ]
getColumnCount [line 1133]

`integer getColumnCount( )`

getColumnCount

API Tags:

Return: | the number of columns in this table
Access: | public

[ Top ]
getColumnName [line 668]

`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

[ Top ]
getColumnNames [line 1152]

`array getColumnNames( )`

returns an array containing all the column names

API Tags:

Access: | public

[ Top ]
getColumns [line 1143]

`array getColumns( )`

returns all columns and their definitions

API Tags:

Access: | public

[ Top ]
getComponentName [line 1285]

`void getComponentName( )`

API Tags:

Access: | public

[ Top ]
getConnection [line 835]

`Doctrine_Connection getConnection( )`

API Tags:

Access: | public

[ Top ]
getData [line 1198]

`array getData( )`

returns internal data, used by Doctrine_Record instances when retrieving data from database

API Tags:

Access: | public

[ Top ]
getDefaultValueOf [line 768]

`mixed getDefaultValueOf( string $column )`

getDefaultValueOf returns the default value(if any) for given column

Parameters:

string | $column: |

API Tags:

Access: | public

[ Top ]
getDefinitionOf [line 1161]

`mixed getDefinitionOf( $column )`

getDefinitionOf

Parameters:

| $column: |

API Tags:

Return: | array on success, false on failure
Access: | public

[ Top ]
getEnumValues [line 1093]

`array getEnumValues( string $field )`

Parameters:

string | $field: |

API Tags:

Access: | public

[ Top ]
getExportableFormat [line 326]

`array getExportableFormat( [ $parseForeignKeys = true] )`

getExportableFormat returns exportable presentation of this object

Parameters:

| $parseForeignKeys: |

API Tags:

Access: | public

[ Top ]
getIdentifier [line 783]

`mixed getIdentifier( )`

API Tags:

Access: | public

[ Top ]
getIdentifierType [line 790]

`integer getIdentifierType( )`

API Tags:

Access: | public

[ Top ]
getIndex [line 514]

`array|boolean getIndex( $index )`

getIndex

Parameters:

| $index: |

API Tags:

Return: | array on success, FALSE on failure
Access: | public

[ Top ]
getOption [line 651]

`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

[ Top ]
getOptions [line 466]

`array getOptions( )`

getOptions returns all options of this table and the associated values

API Tags:

Return: | all options and their values
Access: | public

[ Top ]
getPrimaryKeys [line 821]

`array getPrimaryKeys( )`

returns all primary keys

API Tags:

Access: | public

[ Top ]
getProxy [line 1053]

`void getProxy( [$id $id = null] )`

Parameters:

$id | $id: | database row id

API Tags:

Access: | public

Information Tags:

Throws: | Doctrine_Find_Exception

[ Top ]
getQueryObject [line 1083]

`Doctrine_Query getQueryObject( )`

API Tags:

Return: | a Doctrine_Query object
Access: | public

[ Top ]
getRecord [line 963]

`Doctrine_Record getRecord( )`

getRecord first checks if record exists in identityMap, if not returns a new record

API Tags:

Access: | public

[ Top ]
getRelation [line 583]

`void getRelation( string $alias, [ $recursive = true] )`

getRelation

Parameters:

string | $alias: | relation alias
| $recursive: |

API Tags:

Access: | public

[ Top ]
getRelationParser [line 434]

`Doctrine_Relation_Parser getRelationParser( )`

getRelationParser return the relation parser associated with this table

API Tags:

Return: | relation parser object
Access: | public

[ Top ]
getRelations [line 593]

`array getRelations( )`

getRelations returns an array containing all relation objects

API Tags:

Return: | an array of Doctrine_Relation objects
Access: | public

[ Top ]
getRepository [line 613]

`Doctrine_Table_Repository getRepository( )`

getRepository

API Tags:

Access: | public

[ Top ]
getTableName [line 1289]

`void getTableName( )`

API Tags:

Access: | public

[ Top ]
getTemplate [line 1306]

`void getTemplate( $template )`

Parameters:

| $template: |

API Tags:

Access: | public

[ Top ]
getTemplates [line 303]

`array getTemplates( )`

getTemplates returns all templates attached to this table

API Tags:

Return: | an array containing all templates
Access: | public

[ Top ]
getTree [line 1272]

`mixed getTree( )`

getter for associated tree

API Tags:

Return: | if tree return instance of Doctrine_Tree, otherwise returns false
Access: | public

[ Top ]
getTypeOf [line 1173]

`mixed getTypeOf( $column )`

getTypeOf

Parameters:

| $column: |

API Tags:

Return: | string on success, false on failure
Access: | public

[ Top ]
hasColumn [line 798]

`boolean hasColumn( $name )`

hasColumn

Parameters:

| $name: |

API Tags:

Access: | public

[ Top ]
hasDefaultValues [line 757]

`boolean hasDefaultValues( )`

hasDefaultValues returns true if this table has default values, otherwise false

API Tags:

Access: | public

[ Top ]
hasPrimaryKey [line 828]

`boolean hasPrimaryKey( $key )`

Parameters:

| $key: |

API Tags:

Access: | public

[ Top ]
hasRelation [line 573]

`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

[ Top ]
isTree [line 1302]

`mixed isTree( )`

determine if table acts as tree

API Tags:

Return: | if tree return true, otherwise returns false
Access: | public

[ Top ]
prepareValue [line 1225]

`mixed prepareValue( string $field, string $value )`

prepareValue this method performs special data preparation depending on the type of the given column

1. It unserializes array and object typed columns
2. Uncompresses gzip typed columns
3. Gets the appropriate enum values for enum typed columns
4. 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

[ Top ]
setColumn [line 687]

`void setColumn( string $name, string $type, [integer $length = null], [mixed $options = array()] )`

setColumn

Parameters:

string | $name: |
string | $type: |
integer | $length: |
mixed | $options: |

API Tags:

Access: | public

Information Tags:

Throws: | Doctrine_Table_Exception if trying use wrongly typed parameter

[ Top ]
setData [line 1188]

`void setData( $data )`

setData doctrine uses this function internally users are strongly discouraged to use this function

Parameters:

array | $data: | internal data

API Tags:

Access: | public

[ Top ]
setOption [line 627]

`Doctrine_Table setOption( string $name, mixed $value )`

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

[ Top ]
setPrimaryKey [line 806]

`void setPrimaryKey( mixed $key )`

Parameters:

mixed | $key: |

API Tags:

Access: | public

[ Top ]
setTableName [line 1293]

`void setTableName( $tableName )`

Parameters:

| $tableName: |

API Tags:

Access: | public

[ Top ]
__get [line 444]

`void __get( string $option )`

__get an alias for getOption

Parameters:

string | $option: |

API Tags:

Access: | public

[ Top ]
__isset [line 456]

`void __isset( string $option )`

__isset

Parameters:

string | $option: |

API Tags:

Access: | public

[ Top ]
__toString [line 1324]

`string __toString( )`

returns a string representation of this object

API Tags:

Access: | public

[ Top ]