1
0
mirror of synced 2024-12-14 07:06:04 +03:00

updated all the necessary classes to use injectable

This commit is contained in:
zYne 2007-10-07 20:58:08 +00:00
parent 13e75b2ccb
commit 43811d2cc6
7 changed files with 34 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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();
@ -119,4 +119,4 @@ class Doctrine_Hydrate_Record extends Doctrine_Object
$table->setAttribute(Doctrine::ATTR_LOAD_REFERENCES, true);
}
}
}
}

View File

@ -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;
}
}

View File

@ -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
@ -591,4 +591,4 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
$r[] = "</pre>";
return implode("\n",$r);
}
}
}

View File

@ -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
@ -317,4 +317,4 @@ class Doctrine_Validator extends Doctrine_Object
return $type;
}
}*/
}
}