1
0
mirror of synced 2025-01-18 06:21:40 +03:00

[DDC-1766] Rename closure

This commit is contained in:
Benjamin Eberlei 2012-04-04 23:21:06 +02:00
parent 3047c4b955
commit 306f9e0ca2

View File

@ -670,7 +670,7 @@ abstract class AbstractQuery
$this->setParameters($params);
}
$saveCache = function() {};
$setCacheEntry = function() {};
if ($this->_hydrationCacheProfile !== null) {
list($cacheKey, $realCacheKey) = $this->getHydrationCacheId();
@ -685,7 +685,8 @@ abstract class AbstractQuery
if ( ! $result) {
$result = array();
}
$saveCache = function($data) use ($cache, $result, $cacheKey, $realCacheKey, $qcp) {
$setCacheEntry = function($data) use ($cache, $result, $cacheKey, $realCacheKey, $qcp) {
$result[$realCacheKey] = $data;
$cache->save($cacheKey, $result, $qcp->getLifetime());
};
@ -694,7 +695,7 @@ abstract class AbstractQuery
$stmt = $this->_doExecute();
if (is_numeric($stmt)) {
$saveCache($stmt);
$setCacheEntry($stmt);
return $stmt;
}
@ -702,7 +703,7 @@ abstract class AbstractQuery
$stmt, $this->_resultSetMapping, $this->_hints
);
$saveCache($data);
$setCacheEntry($data);
return $data;
}