From 7bb0a2981960e529365c2468ffecbab51bbffb2c Mon Sep 17 00:00:00 2001 From: zYne Date: Thu, 7 Jun 2007 16:26:01 +0000 Subject: [PATCH] --- lib/Doctrine/Manager.php | 1 + lib/Doctrine/Object.php | 60 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 lib/Doctrine/Object.php diff --git a/lib/Doctrine/Manager.php b/lib/Doctrine/Manager.php index aa6f9ca40..363b5c3cc 100644 --- a/lib/Doctrine/Manager.php +++ b/lib/Doctrine/Manager.php @@ -80,6 +80,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera Doctrine_Record_Iterator::initNullObject($this->_null); Doctrine_Validator::initNullObject($this->_null); Doctrine_Record_Filter::initNullObject($this->_null); + Doctrine_Object::initNullObject($this->_null); } /** * @return Doctrine_Null diff --git a/lib/Doctrine/Object.php b/lib/Doctrine/Object.php new file mode 100644 index 000000000..4b62d10d9 --- /dev/null +++ b/lib/Doctrine/Object.php @@ -0,0 +1,60 @@ +. + */ + +/** + * Doctrine_Object + * + * @package Doctrine + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + * @version $Revision$ + * @author Konsta Vesterinen + */ +class Doctrine_Object +{ + /** + * @var Doctrine_Null $null Doctrine_Null object, used for extremely fast null value checking + */ + protected static $_null; + /** + * 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; + } +}