This commit is contained in:
parent
ea8384129f
commit
15c4235faa
@ -158,7 +158,44 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* fetch
|
||||||
|
* fetches data using the provided queryKey and
|
||||||
|
* the associated query in the query registry
|
||||||
|
*
|
||||||
|
* if no query for given queryKey is being found a
|
||||||
|
* Doctrine_Query_Registry exception is being thrown
|
||||||
|
*
|
||||||
|
* @param string $queryKey the query key
|
||||||
|
* @param array $params prepared statement params (if any)
|
||||||
|
* @return mixed the fetched data
|
||||||
|
*/
|
||||||
|
public function find($queryKey, $params = array(), $hydrationMode = Doctrine::HYDRATE_RECORD)
|
||||||
|
{
|
||||||
|
return Doctrine_Manager::getInstance()
|
||||||
|
->getQueryRegistry()
|
||||||
|
->get($queryKey)
|
||||||
|
->execute($params, $hydrationMode);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* fetchOne
|
||||||
|
* fetches data using the provided queryKey and
|
||||||
|
* the associated query in the query registry
|
||||||
|
*
|
||||||
|
* if no query for given queryKey is being found a
|
||||||
|
* Doctrine_Query_Registry exception is being thrown
|
||||||
|
*
|
||||||
|
* @param string $queryKey the query key
|
||||||
|
* @param array $params prepared statement params (if any)
|
||||||
|
* @return mixed the fetched data
|
||||||
|
*/
|
||||||
|
public function findOne($queryKey, $params = array(), $hydrationMode = Doctrine::HYDRATE_RECORD)
|
||||||
|
{
|
||||||
|
return Doctrine_Manager::getInstance()
|
||||||
|
->getQueryRegistry()
|
||||||
|
->get($queryKey)
|
||||||
|
->fetchOne($params, $hydrationMode);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* connection
|
* connection
|
||||||
*
|
*
|
||||||
|
@ -1399,7 +1399,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
|
|||||||
* @param array $params prepared statement params (if any)
|
* @param array $params prepared statement params (if any)
|
||||||
* @return mixed the fetched data
|
* @return mixed the fetched data
|
||||||
*/
|
*/
|
||||||
public function fetch($queryKey, $params = array(), $hydrationMode = Doctrine::HYDRATE_RECORD)
|
public function find($queryKey, $params = array(), $hydrationMode = Doctrine::HYDRATE_RECORD)
|
||||||
{
|
{
|
||||||
return Doctrine_Manager::getInstance()
|
return Doctrine_Manager::getInstance()
|
||||||
->getQueryRegistry()
|
->getQueryRegistry()
|
||||||
@ -1418,7 +1418,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
|
|||||||
* @param array $params prepared statement params (if any)
|
* @param array $params prepared statement params (if any)
|
||||||
* @return mixed the fetched data
|
* @return mixed the fetched data
|
||||||
*/
|
*/
|
||||||
public function fetchOne($queryKey, $params = array(), $hydrationMode = Doctrine::HYDRATE_RECORD)
|
public function findOne($queryKey, $params = array(), $hydrationMode = Doctrine::HYDRATE_RECORD)
|
||||||
{
|
{
|
||||||
return Doctrine_Manager::getInstance()
|
return Doctrine_Manager::getInstance()
|
||||||
->getQueryRegistry()
|
->getQueryRegistry()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user