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_Hydrate

Source Location: /Doctrine/Hydrate.php

## Class Doctrine_Hydrate

Class Overview

Implements interfaces: Serializable (internal interface) Doctrine_Hydrate is a base class for Doctrine_RawSql and Doctrine_Query. Its purpose is to populate object graphs. Located in /Doctrine/Hydrate.php [line 35]
    Doctrine_Object
       |
       --Doctrine_Hydrate
Author(s): Konsta Vesterinen <kvesteri@cc.hut.fi> Information Tags:
Version: | $Revision: 2234 $
Link: | www.phpdoctrine.com
Since: | 1.0
License: | LGPL
| Properties $aggregateMap $parts $pendingAggregates $type $_aliasMap $_cache $_conn $_expireCache $_hydrationMode $_options $_params $_sql $_tableAliases $_tableAliasSeeds $_timeToLive $_view | Methods __construct addQueryPart addTableAlias applyInheritance clear convertEnums copyAliases createSubquery execute expireCache fetchArray fetchOne generateNewTableAlias generateTableAlias getAliasDeclaration getAliasMap getCachedForm getCacheDriver getComponentAlias getConnection getParams getQueryPart getRoot getRootAlias getRootDeclaration getSql getTableAlias getTableAliases getTableAliasSeed getType getView hasAliasDeclaration hasTableAlias isLimitSubqueryUsed parseData2 removeQueryPart serialize setAliasMap setCacheLifeSpan setHydrationMode setParams setQueryPart setView unserialize useCache _execute _setLastElement __toString

[ Top ]
Direct descendents

Child Class | Description
--- | ---
Doctrine_Query_Abstract | Doctrine_Query_Abstract

[ Top ]
Inherited Properties, Constants, and Methods

Inherited Properties | Inherited Methods | Inherited Constants
--- | --- | ---
Inherited From Doctrine_Object Doctrine_Object::$_null | 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 ]
Constant Summary

CREATE | constant for CREATE queries
DELETE | constant for DELETE queries
HYDRATE_ARRAY | Constant for the array hydration mode.
HYDRATE_RECORD | Constant for the record (object) hydration mode.
INSERT | constant for INSERT queries
SELECT | constant for SELECT queries
UPDATE | constant for UPDATE queries

[ Top ]
Property Summary

array | $aggregateMap |
array | $parts |
mixed | $pendingAggregates |
integer | $type |
array | $_aliasMap |
array | $_cache |
Doctrine_Connection | $_conn |
boolean | $_expireCache |
mixed | $_hydrationMode | The current hydration mode.
array | $_options |
array | $_params |
string | $_sql |
mixed | $_tableAliases |
array | $_tableAliasSeeds |
mixed | $_timeToLive |
Doctrine_View | $_view |

[ Top ]
Method Summary

Doctrine_Hydrate | __construct() | constructor
Doctrine_Hydrate | addQueryPart() | addQueryPart adds a query part in the query part array
Doctrine_Hydrate | addTableAlias() | addTableAlias adds an alias for table and associates it with given component alias
string | applyInheritance() | applyInheritance applies column aggregation inheritance to DQL / SQL query
void | clear() | clear resets all the variables
void | convertEnums() |
Doctrine_Hydrate | copyAliases() | copyAliases copy aliases from another Hydrate object
Doctrine_Hydrate | createSubquery() | createSubquery creates a subquery
Doctrine_Collection | execute() | execute executes the query and populates the data set
Doctrine_Hydrate | expireCache() | expireCache
array | fetchArray() | fetchArray Convenience method to execute using array fetching as hydration mode.
mixed | fetchOne() | fetchOne Convenience method to execute the query and return the first item of the collection.
string | generateNewTableAlias() | generateNewTableAlias generates a new alias from given table alias
string | generateTableAlias() | generateTableAlias generates a table alias from given table name and associates it with given component alias
array | getAliasDeclaration() | getAliasDeclaration get the declaration for given component alias
array | getAliasMap() | getAliasMap returns the component alias map
string | getCachedForm() | getCachedForm returns the cached form of this query for given resultSet
Doctrine_Cache_Interface|boolean|null | getCacheDriver() | getCacheDriver returns the cache driver associated with this object
string | getComponentAlias() | getComponentAlias get component alias associated with given table alias
Doctrine_Connection | getConnection() | getConnection
array | getParams() | getParams
Doctrine_Hydrate | getQueryPart() | setQueryPart sets a query part in the query part array
Doctrine_Table | getRoot() | getRoot returns the root component for this object
array | getRootAlias() | getRootAlias returns the alias of the the root component
array | getRootDeclaration() | getRootDeclaration returns the root declaration
string | getSql() | getSql return the sql associated with this object
string | getTableAlias() | getTableAlias some database such as Oracle need the identifier lengths to be < ~30 chars hence Doctrine creates as short identifier aliases as possible
array | getTableAliases() | getTableAliases returns all table aliases
integer | getTableAliasSeed() | getTableAliasSeed returns the alias seed for given table alias
integer | getType() | getType
Doctrine_View | getView() | getView returns the view associated with this query object (if any)
boolean | hasAliasDeclaration() | hasAliasDeclaration whether or not this object has a declaration for given component alias
boolean | hasTableAlias() | hasTableAlias whether or not this object has given tableAlias
boolean | isLimitSubqueryUsed() | limitSubqueryUsed whether or not limit subquery was used
array | parseData2() | parseData parses the data returned by statement object
Doctrine_Hydrate | removeQueryPart() | removeQueryPart removes a query part from the query part array
array | serialize() | serialize this method is automatically called when this Doctrine_Hydrate is serialized
Doctrine_Hydrate | setAliasMap() | setAliasMap sets the whole component alias map
Doctrine_Hydrate | setCacheLifeSpan() | setCacheLifeSpan
void | setHydrationMode() | Sets the fetchmode.
void | setParams() | setParams
Doctrine_Hydrate | setQueryPart() | setQueryPart sets a query part in the query part array
void | setView() | setView sets a database view this query object uses this method should only be called internally by doctrine
void | unserialize() | unseralize this method is automatically called everytime a Doctrine_Hydrate object is unserialized
Doctrine_Hydrate | useCache() | useCache
void | _execute() |
void | _setLastElement() | _setLastElement
string | __toString() |

[ Top ]
Properties
array $aggregateMap = array() [line 104]
API Tags:

Access: | protected

[ Top ]
array $parts = array(
'select' => array(),'distinct'=>false,'forUpdate'=>false,'from'=>array(),'set'=>array(),'join'=>array(),'where'=>array(),'groupby'=>array(),'having'=>array(),'orderby'=>array(),'limit'=>false,'offset'=>false,) [line 120]
API Tags:

Access: | protected

[ Top ]
mixed $pendingAggregates = array() [line 99]
API Tags:

Access: | protected

[ Top ]
integer $type = self::SELECT [line 139]
API Tags:

See: | Doctrine_Query::* constants
Access: | protected

[ Top ]
array $_aliasMap = array() [line 95]
API Tags:

Access: | protected

[ Top ]
array $_cache [line 143]
API Tags:

Access: | protected

[ Top ]
Doctrine_Connection $_conn [line 77]
API Tags:

Access: | protected

[ Top ]
boolean $_expireCache = false [line 151]
API Tags:

Access: | protected

[ Top ]
mixed $_hydrationMode = self::HYDRATE_RECORD [line 147]

The current hydration mode.

API Tags:

Access: | protected

[ Top ]
array $_options = array(
'fetchMode' => Doctrine::FETCH_RECORD,
'parserCache' => false,
'resultSetCache' => false,
) [line 108]
API Tags:

Access: | protected

[ Top ]
array $_params = array() [line 73]
API Tags:

Access: | protected

[ Top ]
string $_sql [line 116]
API Tags:

Access: | protected

[ Top ]
mixed $_tableAliases = array() [line 155]
API Tags:

Access: | protected

[ Top ]
array $_tableAliasSeeds = array() [line 161]
API Tags:

Access: | protected

[ Top ]
mixed $_timeToLive [line 153]
API Tags:

Access: | protected

[ Top ]
Doctrine_View $_view [line 82]
API Tags:

Access: | protected

[ Top ]
Methods
Constructor __construct [line 167]

`Doctrine_Hydrate __construct( [Doctrine_Connection|null $connection = null] )`

constructor

Parameters:

Doctrine_Connection|null | $connection: |

API Tags:

Access: | public

[ Top ]
addQueryPart [line 476]

`Doctrine_Hydrate addQueryPart( string $name, string $part )`

addQueryPart adds a query part in the query part array

Parameters:

string | $name: | the name of the query part to be added
string | $part: | query part string

API Tags:

Return: | this object
Access: | public

Information Tags:

Throws: | Doctrine_Hydrate_Exception if trying to add unknown query part

[ Top ]
addTableAlias [line 435]

`Doctrine_Hydrate addTableAlias( string $tableAlias, string $componentAlias )`

addTableAlias adds an alias for table and associates it with given component alias

Parameters:

string | $componentAlias: | the alias for the query component associated with given tableAlias
string | $tableAlias: | the table alias to be added

API Tags:

Access: | public

[ Top ]
applyInheritance [line 858]

`string applyInheritance( )`

applyInheritance applies column aggregation inheritance to DQL / SQL query

API Tags:

Access: | public

[ Top ]
clear [line 632]

`void clear( )`

clear resets all the variables

API Tags:

Access: | protected

[ Top ]
convertEnums [line 698]

`void convertEnums( $params )`

Parameters:

| $params: |

API Tags:

Access: | public

Redefined in descendants as:

- Doctrine_Query::convertEnums() : convertEnums convert enum parameters to their integer equivalents

[ Top ]
copyAliases [line 590]

`Doctrine_Hydrate copyAliases( Doctrine_Hydrate $query )`

copyAliases copy aliases from another Hydrate object

this method is needed by DQL subqueries which need the aliases of the parent query

Parameters:

Doctrine_Hydrate | $query: | the query object from which the aliases are copied from

API Tags:

Return: | this object
Access: | public

[ Top ]
createSubquery [line 603]

`Doctrine_Hydrate createSubquery( )`

createSubquery creates a subquery

API Tags:

Access: | public

[ Top ]
execute [line 781]

`Doctrine_Collection execute( [string $params = array()], [ $hydrationMode = null] )`

execute executes the query and populates the data set

Parameters:

string | $params: |
| $hydrationMode: |

API Tags:

Return: | the root collection
Access: | public

[ Top ]
expireCache [line 256]

`Doctrine_Hydrate expireCache( [boolean $expire = true] )`

expireCache

Parameters:

boolean | $expire: | whether or not to force cache expiration

API Tags:

Return: | this object
Access: | public

[ Top ]
fetchArray [line 918]

`array fetchArray( [string $params = array()] )`

fetchArray Convenience method to execute using array fetching as hydration mode.

Parameters:

string | $params: |

API Tags:

Access: | public

[ Top ]
fetchOne [line 930]

`mixed fetchOne( [string $params = array()], [int $hydrationMode = null] )`

fetchOne Convenience method to execute the query and return the first item of the collection.

Parameters:

string | $params: | Parameters
int | $hydrationMode: | Hydration mode

API Tags:

Return: | Array or Doctrine_Collection or false if no result.
Access: | public

[ Top ]
generateNewTableAlias [line 330]

`string generateNewTableAlias( string $tableAlias )`

generateNewTableAlias generates a new alias from given table alias

Parameters:

string | $tableAlias: | table alias from which to generate the new alias from

API Tags:

Return: | the created table alias
Access: | public

[ Top ]
generateTableAlias [line 396]

`string generateTableAlias( string $componentAlias, string $tableName )`

generateTableAlias generates a table alias from given table name and associates it with given component alias

Parameters:

string | $componentAlias: | the component alias to be associated with generated table alias
string | $tableName: | the table name from which to generate the table alias

API Tags:

Return: | the generated table alias
Access: | public

[ Top ]
getAliasDeclaration [line 571]

`array getAliasDeclaration( string $componentAlias )`

getAliasDeclaration get the declaration for given component alias

Parameters:

string | $componentAlias: | the component alias the retrieve the declaration from

API Tags:

Return: | the alias declaration
Access: | public

[ Top ]
getAliasMap [line 721]

`array getAliasMap( )`

getAliasMap returns the component alias map

API Tags:

Return: | component alias map
Access: | public

[ Top ]
getCachedForm [line 732]

`string getCachedForm( $resultSet )`

getCachedForm returns the cached form of this query for given resultSet

Parameters:

array | $resultSet: |

API Tags:

Return: | serialized string representation of this query
Access: | public

[ Top ]
getCacheDriver [line 283]

`Doctrine_Cache_Interface|boolean|null getCacheDriver( )`

getCacheDriver returns the cache driver associated with this object

API Tags:

Return: | cache driver
Access: | public

[ Top ]
getComponentAlias [line 366]

`string getComponentAlias( string $tableAlias )`

getComponentAlias get component alias associated with given table alias

Parameters:

string | $tableAlias: | the table alias that identifies the component alias

API Tags:

Return: | component alias
Access: | public

[ Top ]
getConnection [line 655]

`Doctrine_Connection getConnection( )`

getConnection

API Tags:

Access: | public

[ Top ]
getParams [line 686]

`array getParams( )`

getParams

API Tags:

Access: | public

[ Top ]
getQueryPart [line 497]

`Doctrine_Hydrate getQueryPart( string $part, string $name )`

setQueryPart sets a query part in the query part array

Parameters:

string | $name: | the name of the query part to be set
string | $part: | query part string

API Tags:

Return: | this object
Access: | public

Information Tags:

Throws: | Doctrine_Hydrate_Exception if trying to set unknown query part

[ Top ]
getRoot [line 208]

`Doctrine_Table getRoot( )`

getRoot returns the root component for this object

API Tags:

Return: | root components table
Access: | public

[ Top ]
getRootAlias [line 180]

`array getRootAlias( )`

getRootAlias returns the alias of the the root component

API Tags:

Access: | public

[ Top ]
getRootDeclaration [line 196]

`array getRootDeclaration( )`

getRootDeclaration returns the root declaration

API Tags:

Access: | public

[ Top ]
getSql [line 224]

`string getSql( )`

getSql return the sql associated with this object

API Tags:

Return: | sql query string
Access: | public

[ Top ]
getTableAlias [line 453]

`string getTableAlias( string $componentAlias, [string $tableName = null] )`

getTableAlias some database such as Oracle need the identifier lengths to be < ~30 chars hence Doctrine creates as short identifier aliases as possible

this method is used for the creation of short table aliases, its also smart enough to check if an alias already exists for given component (componentAlias)

Parameters:

string | $componentAlias: | the alias for the query component to search table alias for
string | $tableName: | the table name from which the table alias is being created

API Tags:

Return: | the generated / fetched short alias
Access: | public

[ Top ]
getTableAliases [line 423]

`array getTableAliases( )`

getTableAliases returns all table aliases

API Tags:

Return: | table aliases as an array
Access: | public

[ Top ]
getTableAliasSeed [line 380]

`integer getTableAliasSeed( string $tableAlias )`

getTableAliasSeed returns the alias seed for given table alias

Parameters:

string | $tableAlias: | table alias that identifies the alias seed

API Tags:

Return: | table alias seed
Access: | public

[ Top ]
getType [line 848]

`integer getType( )`

getType

returns the type of this query object by default the type is Doctrine_Hydrate::SELECT but if update() or delete() are being called the type is Doctrine_Hydrate::UPDATE and Doctrine_Hydrate::DELETE, respectively

API Tags:

Return: | return the query type
See: | Doctrine_Hydrate::DELETE
See: | Doctrine_Hydrate::UPDATE
See: | Doctrine_Hydrate::SELECT
Access: | public

[ Top ]
getView [line 677]

`Doctrine_View getView( )`

getView returns the view associated with this query object (if any)

API Tags:

Return: | the view associated with this query object
Access: | public

[ Top ]
hasAliasDeclaration [line 560]

`boolean hasAliasDeclaration( string $componentAlias )`

hasAliasDeclaration whether or not this object has a declaration for given component alias

Parameters:

string | $componentAlias: | the component alias the retrieve the declaration from

API Tags:

Access: | public

[ Top ]
hasTableAlias [line 355]

`boolean hasTableAlias( string $tableAlias )`

hasTableAlias whether or not this object has given tableAlias

Parameters:

string | $tableAlias: | the table alias to be checked

API Tags:

Return: | true if this object has given alias, otherwise false
Access: | public

[ Top ]
isLimitSubqueryUsed [line 622]

`boolean isLimitSubqueryUsed( )`

limitSubqueryUsed whether or not limit subquery was used

API Tags:

Access: | public

Redefined in descendants as:

- Doctrine_Query::isLimitSubqueryUsed() : limitSubqueryUsed

[ Top ]
parseData2 [line 964]

`array parseData2( mixed $stmt, $hydrationMode )`

parseData parses the data returned by statement object

This is method defines the core of Doctrine object population algorithm hence this method strives to be as fast as possible

The key idea is the loop over the rowset only once doing all the needed operations within this massive loop.

Parameters:

mixed | $stmt: |
| $hydrationMode: |

API Tags:

Access: | public

[ Top ]
removeQueryPart [line 513]

`Doctrine_Hydrate removeQueryPart( string $name )`

removeQueryPart removes a query part from the query part array

Parameters:

string | $name: | the name of the query part to be removed

API Tags:

Return: | this object
Access: | public

Information Tags:

Throws: | Doctrine_Hydrate_Exception if trying to remove unknown query part

[ Top ]
serialize [line 307]

`array serialize( )`

serialize this method is automatically called when this Doctrine_Hydrate is serialized

API Tags:

Return: | an array of serialized properties
Access: | public

Implementation of:

Serializable::serialize

[ Top ]
setAliasMap [line 709]

`Doctrine_Hydrate setAliasMap( $map )`

setAliasMap sets the whole component alias map

Parameters:

array | $map: | alias map

API Tags:

Return: | this object
Access: | public

[ Top ]
setCacheLifeSpan [line 268]

`Doctrine_Hydrate setCacheLifeSpan( integer $timeToLive )`

setCacheLifeSpan

Parameters:

integer | $timeToLive: | how long the cache entry is valid

API Tags:

Return: | this object
Access: | public

[ Top ]
setHydrationMode [line 296]

`void setHydrationMode( $hydrationMode, integer $fetchmode )`

Sets the fetchmode.

Parameters:

integer | $fetchmode: | One of the Doctrine_Hydrate::HYDRATE_* constants.
| $hydrationMode: |

API Tags:

Access: | public

[ Top ]
setParams [line 695]

`void setParams( [ $params = array()] )`

setParams

Parameters:

array | $params: |

API Tags:

Access: | public

[ Top ]
setQueryPart [line 535]

`Doctrine_Hydrate setQueryPart( string $name, string $part )`

setQueryPart sets a query part in the query part array

Parameters:

string | $name: | the name of the query part to be set
string | $part: | query part string

API Tags:

Return: | this object
Access: | public

Information Tags:

Throws: | Doctrine_Hydrate_Exception if trying to set unknown query part

[ Top ]
setView [line 667]

`void setView( Doctrine_View $view )`

setView sets a database view this query object uses this method should only be called internally by doctrine

Parameters:

Doctrine_View | $view: | database view

API Tags:

Access: | public

[ Top ]
unserialize [line 319]

`void unserialize( string $serialized )`

unseralize this method is automatically called everytime a Doctrine_Hydrate object is unserialized

Parameters:

string | $serialized: | Doctrine_Record as serialized string

API Tags:

Access: | public

Implementation of:

Serializable::unserialize

[ Top ]
useCache [line 235]

`Doctrine_Hydrate useCache( [Doctrine_Cache_Interface|bool $driver = true], [integer $timeToLive = null] )`

useCache

Parameters:

Doctrine_Cache_Interface|bool | $driver: | cache driver
integer | $timeToLive: | how long the cache entry is valid

API Tags:

Return: | this object
Access: | public

[ Top ]
_execute [line 749]

`void _execute( $params )`

Parameters:

| $params: |

API Tags:

Access: | public

[ Top ]
_setLastElement [line 1182]

`void _setLastElement( &$prev, &$coll, boolean|integer $index, $alias, $oneToOne )`

_setLastElement

sets the last element of given data array / collection as previous element

Parameters:

boolean|integer | $index: |
| &$prev: |
| &$coll: |
| $alias: |
| $oneToOne: |

API Tags:

Access: | public

[ Top ]
__toString [line 1213]

`string __toString( )`

API Tags:

Return: | returns a string representation of this object
Access: | public

[ Top ]
Constants
CREATE = 4 [line 60]

constant for CREATE queries

[ Top ]
DELETE = 1 [line 48]

constant for DELETE queries

[ Top ]
HYDRATE_ARRAY = 3 [line 64]

Constant for the array hydration mode.

[ Top ]
HYDRATE_RECORD = 2 [line 68]

Constant for the record (object) hydration mode.

[ Top ]
INSERT = 3 [line 56]

constant for INSERT queries

[ Top ]
SELECT = 0 [line 44]

constant for SELECT queries

[ Top ]
UPDATE = 2 [line 52]

constant for UPDATE queries

[ Top ]