Savant3 alpha2 Released

Savant3 is a PHP5 E_STRICT compliant template system; it is non-compiling by default, which means it uses plain PHP for its template language. It supports object-oriented plugins and output filters, supports multiple paths for template sources so you can “theme” or “skin” your application, has built-in support for streams as template sources, and has an automated hook for custom user-defined compilers.

The change notes for this release (3.0.0alpha2) are:

  • This is an ALPHA release; while mostly stable, future releases may break backwards comptability.
  • Added methods for escaping output (and for printing of escaped output). As a result, the ‘scrub’ plugin is deprecated and will be removed from future versions of Savant. Use $this->escape() instead of $this->scrub(), and "$this->_()" instead of "echo $this->scrub()".
  • Added new plugin ‘html_attribs’ to standardize how HTML attributes are added to a tag.
  • Added a whole series of ‘form_*’ plugins, one for each element type (button, checkbox, radio, select, text, and so on). These plugins generate only the related element with no layout, and have a standard argument order (name, value, attribs). In addition, they are Solar_Form friendly; if the first argument is an array instead of a string, that array is assumed to be a Solar_Form element array with ‘name’, ‘value’, ‘attribs’, etc. keys. Having them as separate plugins will make it easier to add new form elements, e.g. ‘form_date’ and ‘form_time’ pseudo-elements, a la HTML_QuickForm.
  • Added new ‘form2’ plugin that uses the ‘form_*’ plugins instead of embedded methods for generating elements. It mimics the current Savant2-derived ‘form’ plugin and is almost identical in function.
  • With respect to the new ‘form_*’ and ‘form2’ plugins, this will be the last release with the current Savant2-derived form plugin. The new ‘form2’ plugin, and the ‘form_*’ plugins, will be separated into their own Savant3_Plugin_Form package so they can be upgraded and maintained separately from the core Savant3 distribution.
Are you stuck with a legacy PHP application? You should buy my book because it gives you a step-by-step guide to improving your codebase, all while keeping it running the whole time.
Share This!Share on Google+Share on FacebookTweet about this on TwitterShare on RedditShare on LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *