Add new directory structure. Tags will contain current and past releases, and stable will contain any bug fixes to the current stable release so users won't have to get the potentially broken trunk build to fix a screwup in stable.
Trunk updated to 0.9 git-svn-id: http://kusabax.cultnet.net/svn/repo/stable@176 73d99b7e-4f53-4972-b7b7-2ecd3c4d89ee
This commit is contained in:
commit
88bacfad9c
316 files changed
+79806
No files matched your search
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Evaluates the given string as if it was a template
|
||||
*
|
||||
* Although this plugin is kind of optimized and will
|
||||
* not recompile your string each time, it is still not
|
||||
* a good practice to use it. If you want to have templates
|
||||
* stored in a database or something you should probably use
|
||||
* the Dwoo_Template_String class or make another class that
|
||||
* extends it
|
||||
* <pre>
|
||||
* * var : the string to use as a template
|
||||
* * assign : if set, the output of the template will be saved in this variable instead of being output
|
||||
* </pre>
|
||||
* 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.
|
||||
*
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
* @copyright Copyright (c) 2008, Jordi Boggiano
|
||||
* @license http://dwoo.org/LICENSE Modified BSD License
|
||||
* @link http://dwoo.org/
|
||||
* @version 1.0.0
|
||||
* @date 2008-10-23
|
||||
* @package Dwoo
|
||||
*/
|
||||
function Dwoo_Plugin_eval(Dwoo $dwoo, $var, $assign = null)
|
||||
{
|
||||
if ($var == '') {
|
||||
return;
|
||||
}
|
||||
|
||||
$tpl = new Dwoo_Template_String($var);
|
||||
$out = $dwoo->get($tpl, $dwoo->readVar('_parent'));
|
||||
|
||||
if ($assign !== null) {
|
||||
$dwoo->assignInScope($out, $assign);
|
||||
} else {
|
||||
return $out;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user