[2008-04-] 0.3.4 ! BC Break: DWOO_PATH constant changed to DWOO_DIRECTORY ! BC Break: Smarty's @ operator for modifiers is now reversed, for example $array|reverse will reverse the items of that array while $array|@reverse will reverse each item of the given array (as if you used array_map) + Syntax: Added support for method calls on objects i.e. {$foo->bar()} + Added support for smarty security features, see the DwooSecurityPolicy class and $dwoo->setSecurityPolicy() + API: Added a DwooCompiler->setLooseOpeningHandling() method that, if set to true, allows tags to contain spaces between the opening bracket and the content. Turned off by default as it allows to compile files containing css and javascript without the need to escape it through {literal} or \{ + Added DWOO_CACHE_DIRECTORY and DWOO_COMPILE_DIRECTORY constants that you can set before including Dwoo.php to override the defaults (although Dwoo->setCacheDir/setCompileDir() still work to change that if required) + Added the DwooException class + Smarty: Added partial support for register_object(), unregister_object() and get_registered_object(). All features can not be supported by the adapter though so you might get compatibility warnings * Fixed {elseif} bug that appeared when multiple elseif tags were used in a row * Syntax: Improved simple math support to work within variable variables (i.e. you can do {$array[$index+1]}) and within strings as well. To prevent this enclose the variables in backticks (i.e. {"$foo/$bar"} will do the math while {"`$foo`/$bar"} won't as $foo is properly delimited) * Changed DwooLoader::addDirectory() so that it writes the class paths cache into DWOO_COMPILE_DIRECTORY, that way you don't have to make your plugin directory writable * Made all the error triggering more consistent * Changed automatic cacheId generation in DwooTemplateFile/String to be faster [2008-03-19] 0.3.3 + Syntax: Added support for $dwoo.const.CONSTANT and $dwoo.const.Class::CONSTANT to read PHP constants from the template + Syntax: Added support for on/off/yes/no, that work as aliases for true/false + Syntax: Added the $dwoo.charset global variable + Plugins: Added {withelse} and made {with} compatible with {else} also + API: Added left/right delimiters customization, see DwooCompiler->setDelimiters() + API: Added DwooCompiler->triggerError() + API: Added Dwoo->clearCache() and DwooITemplate->clearCache() methods + Smarty: The smartyCompat prefilter converts {section} tags into {for} tags on the fly, however it's not guaranteed to work with *all* section tags, let me know if it breaks for you * {with} now skips the entire block if it's variable doesn't exist, so by itself it acts as if you would do {if $var}{with $var}{/with}{/if} * Each resource has a compiler factory function assigned to it, allowing you to easily provide a custom compiler without loading it on every page * OutputFilters are now simply called Filters (they still use DwooFilter) * Pre/PostFilters have become Pre/PostProcessors (they now use DwooProcessor) * Compiler: Fixed parsing bug that prevented function names of 1character * Compiler: Changed internal handling of variables to fix some errors being thrown with specific cases * Reorganized Dwoo/DwooCompiler and fully commented all the core classes and interfaces [2008-03-09] 0.3.2 + Added access to superglobals through $dwoo.get.value, $dwoo.post.value, etc. + Added outputFilters to Dwoo (use Dwoo->addOutputFilter and Dwoo->removeOutputFilter) + Added preFilters and postFilters to DwooCompiler (use DwooCompiler->addPreFilter, etc) + Added a html_format output filter that intends properly the html code, use it only on full page templates + Plugins: Added {for} and {forelse} which allow to loop over an array or to loop over a range of numbers + Plugins: Added {mailto}, {counter}, {eval}, {fetch} and {include} + Syntax : Enhanced support for implicit math operations, {$var+$var2*var3+5} now works. Operations are executed from left to right though, there is no operator priority. (i.e. 1+1*2 = (1+1)*2 = 4, not 3) + API: Added resources support through DwooITemplate implementations and Dwoo->addResource() + API: Added Dwoo->getTemplate() to get the currently running template object + API: Added DwooCompiler::getInstance() to use only one compiler object when rendering from the default compiler and to provide you with a singleton if it's easier, however the class is not a singleton in the sense that it can be instantiated separately + API: Added a factory method on DwooITemplate to support resources creation + Added a release tag so that all compiled templates are forced to recompile after an update, however it is recommended to cleanup your "compiled" directory now and then as each release uses new filenames + Added an abstract DwooFilter class that you can extend to build filters * PHP function calls are now case insensitive * Syntax: The compiler now parses expressions before modifiers, allowing for {$var/2|number_format} for example * DwooTemplateFile now extends DwooTemplateString instead of the other way around as it was before * {else} is now a general purpose plugin that can act as 'else' for foreach, for and if/elseif, foreachelse is still available though [2008-03-05] 0.3.1 + Added {cycle} function + Syntax : Enabled support for associative arrays using array(key="value", key2=5) for example, which you can assign or use in a foreach directly + Syntax : Added support for {$var +-/*% X} (i.e. {$var + 4}), useful for simple math operations without the math plugin + API : Added append/appendByRef to DwooData + Completely rebuilt DwooSmartyAdapter, it should "work" and fail silently if you use a non supported function now, however you can set $smarty->show_compat_errors=true; on it to receive notices about unsupported features that you use * Bug fixed in {literal} parsing * Bug fixed in smarty functions handling * API : Moved Plugin types constants to Dwoo so the compiler doesn't have to be loaded unles really required * API : Moved globals and var reinitialization in Dwoo into their own methods so that child classes can easily add globals * Some improvements in the compiler output * Some changes in the cache handling of DwooTemplateFile - Special thanks to Andrew Collins that found many of the bugs fixed in this release [2008-03-02] 0.3.0 + Full template cache support + DwooTemplateString class to load templates from a string + Dwoo::VERSION constant + {dump} plugin to print out variables + Unit tests (with PHPUnit) covering 73% of the codebase right now, which should help reducing regression bugs in the next versions. + Started commenting (with phpdocs) properly all the classes, should be complete for 0.4.0 * {capture} is now compilable and has a new boolean flag to append output into the target variable instead of overwriting * {foreach} supports direct input (instead of only variables), allowing constructs like {foreach array(a,b,c) val}{$val}{/foreach} for example that would output abc. * pre/postProcessing functions in block plugins now receive an array of named parameters instead of numbered * Major refactoring of DwooTemplateFile and DwooCompiler * Cleaned up members visibility in Dwoo/DwooCompiler * Fixes in the compiler parsing and general variables handling * Multiple bugfixes here and there thanks to the unit tests * Optimized {foreach} a lot [2008-02-19] 0.2.1 * Compiler fixes for argument parsing and handling of Smarty plugins [2008-02-14] 0.2.0 + Added support for plugins made for Smarty (that includes modifiers, functions and blocks). Not thoroughly tested. + Major API changes in the way Dwoo must be run, it's now much more flexible and should not change too much in the future. + Added support for custom plugins, filters should come in the next version although the API to register them is already in. [2008-02-08] 0.1.0 Initial release