Author: Raymond Bosman
Date: 2007-04-10 16:09:05 +0200 (Tue, 10 Apr 2007)
New Revision: 4843

Log:
- Forgot to add this file.

Added:
   trunk/Template/tests/override.php

Added: trunk/Template/tests/override.php
===================================================================
--- trunk/Template/tests/override.php   2007-04-10 13:41:03 UTC (rev 4842)
+++ trunk/Template/tests/override.php   2007-04-10 14:09:05 UTC (rev 4843)
@@ -0,0 +1,45 @@
+<?php
+
+ezcTestRunner::addFileToFilter( __FILE__ );
+
+class OverrideCustomFunction implements ezcTemplateCustomFunction
+{
+    public static function getCustomFunctionDefinition( $name )
+    {
+        if ( $name == "override" )
+        {
+            $def = new ezcTemplateCustomFunctionDefinition();
+            $def->class = __CLASS__;
+            $def->method = "override";
+
+            return $def;
+        }
+    }
+
+    public static function override()
+    {
+        return new OverrideLocation( "override_test" ); // Refer to 
override_test.ezt
+    }
+}
+
+
+class OverrideLocation implements ezcTemplateLocationInterface
+{
+    private $keys = array();
+    private $path;
+
+    
+    public function __construct( $path )
+    {
+        $this->path = $path;
+    }
+
+    public function getPath()
+    {
+        return $this->path . ".ezt";
+    }
+}
+
+
+
+?>


Property changes on: trunk/Template/tests/override.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