Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
Dwoo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Common
Dwoo
Commits
dc02338d
Commit
dc02338d
authored
May 08, 2008
by
Seldaek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
svn://dwoo.org/dwoo/trunk@50
0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent
f9676b0d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
CHANGELOG
CHANGELOG
+4
-0
eol.php
lib/plugins/builtin/functions/eol.php
+25
-0
FuncTests.php
tests/FuncTests.php
+8
-0
No files found.
CHANGELOG
View file @
dc02338d
...
...
@@ -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()
...
...
lib/plugins/builtin/functions/eol.php
0 → 100644
View file @
dc02338d
<?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'
;
}
tests/FuncTests.php
View file @
dc02338d
...
...
@@ -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}'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment