Commit dc02338d by Seldaek

git-svn-id: svn://dwoo.org/dwoo/trunk@50 0598d79b-80c4-4d41-97ba-ac86fbbd088b

parent f9676b0d
......@@ -14,6 +14,7 @@
http://wiki.dwoo.org/index.php/Block:loop for details
+ Plugins: Added {do} that executes whatever you feed it whitout echoing the
result, used internally for extends but you can use it if required
+ Plugins: Added {eol} that prints an end of line character (OS-specific)
+ Syntax: Added shortcut for {$dwoo.const.*} using '%', for example you can use
{%FOO} instead of {$dwoo.const.FOO}
+ Syntax: When using named parameters, typing a parameter name without any
......@@ -23,11 +24,14 @@
+ Syntax: Added support for {$foo+=5}, {$foo="a"}, {$foo++} and {$foo--}
+ Syntax: Added shortcut for $dwoo.*, you can now use {$.foreach.foo} instead
of {$dwoo.foreach.foo} for example, applies to all $dwoo.* vars
+ Syntax: Added $ as a shortcut for current scope, $_ for $_parent and $__ for
$_root
+ API: Added getSource(), getUid() and getResourceIdentifier() to Dwoo_ITemplate
+ API: Added setSecurityPolicy() too Dwoo_ICompiler and modified the arguments
of its compile() method
+ API: Added a bunch of utility functions to Dwoo_Compiler, allowing compiled
plugins to access more of the compiler internals
+ Added a 'data' argument to {include} to be able to feed data directly into it
* Fixed a potential concurrency issue (thanks to Rasmus Schultz for the patch)
* Moved all files to Dwoo/Class.php excepted for the core Dwoo.php file
* Various performance improvements, including the removal of a lot of isset()
......
<?php
/**
* TOCOM
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from the use of this software.
*
* This file is released under the LGPL
* "GNU Lesser General Public License"
* More information can be found here:
* {@link http://www.gnu.org/copyleft/lesser.html}
*
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
* @link http://dwoo.org/
* @version 0.3.4
* @date 2008-04-09
* @package Dwoo
*/
function Dwoo_Plugin_eol_compile(Dwoo_Compiler $compiler)
{
return 'PHP_EOL';
}
......@@ -143,6 +143,14 @@ class FuncTests extends PHPUnit_Framework_TestCase
$this->assertEquals("", $this->dwoo->get($tpl, array('foo'=>"moo"), $this->compiler));
}
public function testEol()
{
$tpl = new Dwoo_Template_String('{eol}');
$tpl->forceCompilation();
$this->assertEquals(PHP_EOL, $this->dwoo->get($tpl, array(), $this->compiler));
}
public function testEscape()
{
$tpl = new Dwoo_Template_String('{escape $foo}');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment