Author: Derick Rethans
Date: 2007-01-19 13:00:48 +0100 (Fri, 19 Jan 2007)
New Revision: 4533

Log:
- Implemented issue #9965: Support for delayed initialization through
  ezcBaseInit.

Added:
   trunk/Template/tests/test_classes.php
Modified:
   trunk/Template/ChangeLog
   trunk/Template/src/configuration.php
   trunk/Template/tests/configuration_test.php

Modified: trunk/Template/ChangeLog
===================================================================
--- trunk/Template/ChangeLog    2007-01-19 11:58:17 UTC (rev 4532)
+++ trunk/Template/ChangeLog    2007-01-19 12:00:48 UTC (rev 4533)
@@ -1,3 +1,10 @@
+1.2beta1 - [RELEASEDATE]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Implemented issue #9965: Support for delayed initialization through
+  ezcBaseInit.
+
+
 1.1 - Monday 18 December 2006
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 

Modified: trunk/Template/src/configuration.php
===================================================================
--- trunk/Template/src/configuration.php        2007-01-19 11:58:17 UTC (rev 
4532)
+++ trunk/Template/src/configuration.php        2007-01-19 12:00:48 UTC (rev 
4533)
@@ -223,6 +223,7 @@
         if ( !isset( self::$instanceList[$name] ) )
         {
             self::$instanceList[$name] = new ezcTemplateConfiguration();
+            ezcBaseInit::fetchConfig( 'ezcInitTemplateConfiguration', 
self::$instanceList[$name] );
         }
 
         return self::$instanceList[$name];

Modified: trunk/Template/tests/configuration_test.php
===================================================================
--- trunk/Template/tests/configuration_test.php 2007-01-19 11:58:17 UTC (rev 
4532)
+++ trunk/Template/tests/configuration_test.php 2007-01-19 12:00:48 UTC (rev 
4533)
@@ -8,6 +8,8 @@
  * @subpackage Tests
  */
 
+require_once 'test_classes.php';
+
 /**
  * @package Template
  * @subpackage Tests
@@ -26,6 +28,13 @@
         $this->templateStorePath = $this->basePath . 'stored_templates/';
     }
 
+    public function testDelayedInit()
+    {
+        ezcBaseInit::setCallback( 'ezcInitTemplateConfiguration', 
'testDelayedInitTemplateConfiguration' );
+        $config = ezcTemplateConfiguration::getInstance();
+        $this->assertEquals( new ezcTemplateNoContext, $config->context );
+    }
+
     public function testDefault()
     {
         $conf = new ezcTemplateConfiguration();

Added: trunk/Template/tests/test_classes.php
===================================================================
--- trunk/Template/tests/test_classes.php       2007-01-19 11:58:17 UTC (rev 
4532)
+++ trunk/Template/tests/test_classes.php       2007-01-19 12:00:48 UTC (rev 
4533)
@@ -0,0 +1,9 @@
+<?php
+class testDelayedInitTemplateConfiguration
+{
+    static function configureObject( $object )
+    {
+        $object->context = new ezcTemplateNoContext;
+    }
+}
+?>


Property changes on: trunk/Template/tests/test_classes.php
___________________________________________________________________
Name: svn:eol-style
   + native

-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to