Doctrine 1.2.4
Doctrine_Hydrator_Abstract Class Reference

Inherits Doctrine_Locator_Injectable.

Inherited by Doctrine_Hydrator_NoneDriver, Doctrine_Hydrator_ScalarDriver, and Doctrine_Hydrator_SingleScalarDriver.

Public Member Functions

 bind ($name, $resource)
 
 getLocator ()
 
 hydrateResultSet ($stmt)
 
 locate ($name)
 
 setHydrationMode ($hydrationMode)
 
 setLocator (Doctrine_Locator $locator)
 
 setQueryComponents ($queryComponents)
 
 setTableAliases ($tableAliases)
 

Static Public Member Functions

static getNullObject ()
 
static initNullObject (Doctrine_Null $null)
 

Protected Member Functions

 _isIgnoredName ($name)
 

Detailed Description

Definition at line 33 of file Abstract.php.

Member Function Documentation

Doctrine_Hydrator_Abstract::_isIgnoredName (   $name)
protected

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).

Parameters
string$name
Returns
boolean

Definition at line 102 of file Abstract.php.

{
return $name == 'DOCTRINE_ROWNUM';
}
Doctrine_Locator_Injectable::bind (   $name,
  $resource 
)
inherited

bind binds a resource to a name

Parameters
string$namethe name of the resource to bind
mixed$valuethe value of the resource
Returns
Doctrine_Locator this object

Definition at line 120 of file Injectable.php.

{
$this->_resources[$name] = $resource;
return $this;
}
Doctrine_Locator_Injectable::getLocator ( )
inherited

getLocator returns the locator associated with this object

if there are no locator locally associated then this method tries to fetch the current global locator

Returns
Doctrine_Locator

Definition at line 75 of file Injectable.php.

{
if ( ! isset($this->_locator)) {
$this->_locator = Doctrine_Locator::instance();
}
return $this->_locator;
}
static Doctrine_Locator_Injectable::getNullObject ( )
staticinherited

getNullObject returns the null object associated with this object

Returns
Doctrine_Null

Definition at line 145 of file Injectable.php.

{
return self::$_null;
}
Doctrine_Hydrator_Abstract::hydrateResultSet (   $stmt)
abstract

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.

Parameters
mixed$stmt
Returns
mixed
static Doctrine_Locator_Injectable::initNullObject ( Doctrine_Null  $null)
staticinherited

initNullObject initializes the null object

Parameters
Doctrine_Null$null
Returns
void

Definition at line 134 of file Injectable.php.

{
self::$_null = $null;
}
Doctrine_Locator_Injectable::locate (   $name)
inherited

locate locates a resource by given name and returns it

if the resource cannot be found locally this method tries to use the global locator for finding the resource

See Also
Doctrine_Locator::locate()
Exceptions
Doctrine_Locator_Exceptionif the resource could not be found
Parameters
string$namethe name of the resource
Returns
mixed the located resource

Definition at line 96 of file Injectable.php.

{
if (isset($this->_resources[$name])) {
if (is_object($this->_resources[$name])) {
return $this->_resources[$name];
} else {
// get the name of the concrete implementation
$concreteImpl = $this->_resources[$name];
return $this->getLocator()->locate($concreteImpl);
}
} else {
return $this->getLocator()->locate($name);
}
}
Doctrine_Hydrator_Abstract::setHydrationMode (   $hydrationMode)

Set the hydration mode

Parameters
mixed$hydrationModeOne of the Doctrine_Core::HYDRATE_* constants or a string representing the name of the hydration mode or or an instance of the hydration class
Returns
void

Definition at line 78 of file Abstract.php.

{
$this->_hydrationMode = $hydrationMode;
}
Doctrine_Locator_Injectable::setLocator ( Doctrine_Locator  $locator)
inherited

setLocator this method can be used for setting the locator object locally

Parameters
Doctrine_Locatorthe locator object
Returns
Doctrine_Locator_Injectable this instance

Definition at line 60 of file Injectable.php.

{
$this->_locator = $locator;
return $this;
}
Doctrine_Hydrator_Abstract::setQueryComponents (   $queryComponents)

Set the query components (structure and query instructions)

Parameters
array$queryComponents
Returns
void

Definition at line 54 of file Abstract.php.

{
$this->_queryComponents = $queryComponents;
}
Doctrine_Hydrator_Abstract::setTableAliases (   $tableAliases)

Set the table aliases for this query

Parameters
array$tableAliases
Returns
void

Definition at line 65 of file Abstract.php.

{
$this->_tableAliases = $tableAliases;
}

The documentation for this class was generated from the following file: