. */ /** * Doctrine_Hydrator_Abstract * * @package Doctrine * @subpackage Hydrate * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.org * @since 1.0 * @version $Revision: 3192 $ * @author Konsta Vesterinen */ abstract class Doctrine_Hydrator_Abstract extends Doctrine_Locator_Injectable { protected $_queryComponents = array(), $_tableAliases = array(), $_priorRow, $_hydrationMode; public function __construct($queryComponents, $tableAliases, $hydrationMode) { $this->_queryComponents = $queryComponents; $this->_tableAliases = $tableAliases; $this->_hydrationMode = $hydrationMode; } public function getRootComponent() { $queryComponents = array_values($this->_queryComponents); return $queryComponents[0]['table']; } public function onDemandReset() { $this->_priorRow = null; } /** * Checks whether a name is ignored. Used during result set parsing to skip * certain elements in the result set that do not have any meaning for the result. * (I.e. ORACLE limit/offset emulation adds doctrine_rownum to the result set). * * @param string $name * @return boolean */ protected function _isIgnoredName($name) { return $name == 'DOCTRINE_ROWNUM'; } /** * hydrateResultSet * 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. * * @param mixed $stmt * @return mixed */ abstract public function hydrateResultSet($stmt); }