constructor
Parameters:
API Tags:
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 |
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:
string applyInheritance(
)
|
|
applyInheritance applies column aggregation inheritance to DQL / SQL query
API Tags:
clear resets all the variables
API Tags:
void convertEnums(
$params
)
|
|
Parameters:
API Tags:
Redefined in descendants as:
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 |
createSubquery creates a subquery
API Tags:
execute executes the query and populates the data set
Parameters:
string |
$params: |
|
|
$hydrationMode: |
|
API Tags:
Return: | the root collection |
Access: | public |
expireCache
Parameters:
boolean |
$expire: |
whether or not to force cache expiration |
API Tags:
Return: | this object |
Access: | public |
array fetchArray(
[string
$params = array()]
)
|
|
fetchArray Convenience method to execute using array fetching as hydration mode.
Parameters:
API Tags:
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 |
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 |
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 |
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 |
getAliasMap returns the component alias map
API Tags:
Return: | component alias map |
Access: | public |
string getCachedForm(
$resultSet
)
|
|
getCachedForm returns the cached form of this query for given resultSet
Parameters:
API Tags:
Return: | serialized string representation of this query |
Access: | public |
getCacheDriver returns the cache driver associated with this object
API Tags:
Return: | cache driver |
Access: | public |
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 |
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 |
getRoot returns the root component for this object
API Tags:
Return: | root components table |
Access: | public |
getRootAlias returns the alias of the the root component
API Tags:
array getRootDeclaration(
)
|
|
getRootDeclaration returns the root declaration
API Tags:
getSql return the sql associated with this object
API Tags:
Return: | sql query string |
Access: | public |
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 |
getTableAliases returns all table aliases
API Tags:
Return: | table aliases as an array |
Access: | public |
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 |
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:
getView returns the view associated with this query object (if any)
API Tags:
Return: | the view associated with this query object |
Access: | public |
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:
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 |
boolean isLimitSubqueryUsed(
)
|
|
limitSubqueryUsed whether or not limit subquery was used
API Tags:
Redefined in descendants as:
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:
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 |
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
setAliasMap sets the whole component alias map
Parameters:
API Tags:
Return: | this object |
Access: | public |
setCacheLifeSpan
Parameters:
integer |
$timeToLive: |
how long the cache entry is valid |
API Tags:
Return: | this object |
Access: | public |
void setHydrationMode(
$hydrationMode, integer
$fetchmode
)
|
|
Sets the fetchmode.
Parameters:
integer |
$fetchmode: |
One of the Doctrine_Hydrate::HYDRATE_* constants. |
|
$hydrationMode: |
|
API Tags:
void setParams(
[
$params = array()]
)
|
|
setParams
Parameters:
API Tags:
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 |
setView sets a database view this query object uses this method should only be called internally by doctrine
Parameters:
API Tags:
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:
Implementation of:
- Serializable::unserialize
useCache
Parameters:
API Tags:
Return: | this object |
Access: | public |
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:
API Tags:
Return: | returns a string representation of this object |
Access: | public |