Commit 43811d2c authored by zYne's avatar zYne

updated all the necessary classes to use injectable

parent 13e75b2c
......@@ -32,7 +32,7 @@
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
abstract class Doctrine_Access extends Doctrine_Object implements ArrayAccess
abstract class Doctrine_Access extends Doctrine_Locator_Injectable implements ArrayAccess
{
/**
* setArray
......
......@@ -31,7 +31,7 @@
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
abstract class Doctrine_Configurable extends Doctrine_Object
abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable
{
/**
* @var array $attributes an array of containing all attributes
......
......@@ -32,7 +32,7 @@
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class Doctrine_Hydrate extends Doctrine_Object implements Serializable
class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializable
{
/**
* QUERY TYPE CONSTANTS
......
......@@ -31,7 +31,7 @@
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class Doctrine_Hydrate_Record extends Doctrine_Object
class Doctrine_Hydrate_Record extends Doctrine_Locator_Injectable
{
protected $_collections = array();
......
......@@ -43,7 +43,10 @@ class Doctrine_Locator_Injectable
* @var array an array of bound resources
*/
protected $_resources = array();
/**
* @var Doctrine_Null $null Doctrine_Null object, used for extremely fast null value checking
*/
protected static $_null;
/**
* setLocator
* this method can be used for setting the locator object locally
......@@ -115,4 +118,25 @@ class Doctrine_Locator_Injectable
return $this;
}
/**
* initNullObject
* initializes the null object
*
* @param Doctrine_Null $null
* @return void
*/
public static function initNullObject(Doctrine_Null $null)
{
self::$_null = $null;
}
/**
* getNullObject
* returns the null object associated with this object
*
* @return Doctrine_Null
*/
public static function getNullObject()
{
return self::$_null;
}
}
......@@ -68,7 +68,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
{
$this->_root = dirname(__FILE__);
Doctrine_Object::initNullObject(new Doctrine_Null);
Doctrine_Locator_Injectable::initNullObject(new Doctrine_Null);
}
/**
* setDefaultAttributes
......
......@@ -30,7 +30,7 @@
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class Doctrine_Validator extends Doctrine_Object
class Doctrine_Validator extends Doctrine_Locator_Injectable
{
/**
* @var array $validators an array of validator objects
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment