Author: romanb
Date: 2008-09-12 13:14:14 +0100 (Fri, 12 Sep 2008)
New Revision: 4938

Modified:
   trunk/lib/Doctrine/Common/Configuration.php
Log:
further cleanup in configuration

Modified: trunk/lib/Doctrine/Common/Configuration.php
===================================================================
--- trunk/lib/Doctrine/Common/Configuration.php 2008-09-12 12:11:59 UTC (rev 
4937)
+++ trunk/lib/Doctrine/Common/Configuration.php 2008-09-12 12:14:14 UTC (rev 
4938)
@@ -28,19 +28,16 @@
  * It combines all configuration options from DBAL & ORM.
  * 
  * INTERNAL: When adding a new configuration option just write a getter/setter
- * combination and add the option to the _attributes array with a proper 
default value.
+ * pair and add the option to the _attributes array with a proper default 
value.
  *
  * @author Roman Borschel <[EMAIL PROTECTED]>
  * @since 2.0
  */
 class Doctrine_Common_Configuration
 {
-    private $_nullObject;
-    
     /**
      * The attributes that are contained in the configuration.
-     * Values are default values. PHP null is replaced by a reference to the 
Null
-     * object on instantiation in order to use isset() instead of 
array_key_exists().
+     * Values are default values.
      *
      * @var array
      */
@@ -58,38 +55,8 @@
      * Creates a new configuration that can be used for Doctrine.
      */
     public function __construct()
-    {
-        $this->_nullObject = new stdClass();
-        $this->_initAttributes();
-    }
+    {}
     
-    /**
-     * Initializes the attributes.
-     * Changes null default values to references to the Null object to allow
-     * fast isset() checks instead of array_key_exists().
-     * 
-     * @return void
-     */
-    private function _initAttributes()
-    {
-        foreach ($this->_attributes as $key => $value) {
-            if ($value === null) {
-                $this->_attributes[$key] = $this->_nullObject;
-            }
-        }
-    }
-    
-    /**
-     * Checks whether the configuration contains/supports an attribute.
-     *
-     * @param string $name
-     * @return boolean
-     */
-    public function has($name)
-    {
-        return isset($this->_attributes[$name]);
-    }
-    
     public function getQuoteIdentifiers()
     {
         return $this->_attributes['quoteIdentifiers'];


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to