This release of Solar includes new Prototype and Scriptaculous ("Protaculous" ;-) Ajax support in the form of view helpers, ext/json compliant JSON support, and a new plugin-aware Markdown engine. Read on for more.
There is one backwards-compatibility break in this release. Previously, the
Solar_View::partial() method would output the results of the partial
template directly. Now it just returns the results. This means that you need to
change all calls from
$this->partial(...). This change makes the partial() method act like all
other view helpers.
To show off some of the possibilities, Clay has added a new demo app under
Although full JSON support will exist in a future version of PHP, this class will help users who need the functionality right now. (Clay has gone to a lot of effort to make Solar_Json behavior functionally identical to the upcoming PHP JSON extension.)
Many thanks, Clay, for your continuing efforts on this portion of Solar.
Markdown is a simplifed
syntax and text processor that converts structured text markup to XHTML, written by
John Gruber. PHP-Markdown is a direct port
of Gruber’s original Perl code to PHP 4 (and non-strict PHP 5) by Michel Fortin.
Now the same text-processing capability exists in Solar as
The major benefit of the Solar version over previous implementations is that it is “plugin aware”, much like the PEAR Text_Wiki package. Each syntax rule is a separate class; you can mix and match syntax rules to fit your particular needs without having to rewrite the entire processing and rendering engine.
Solar now comes with three Markdown rule sets:
Solar_Markdownproper, an implementation of the original markup rules in the Perl and PHP versions. It provides for headers, lists, strong and emphasis, links and inline URIs, code examples, and much more. In general, it leaves HTML in place, so it may not be suitable for untrusted or anonymous environments.
Solar_Markdown_Extra, an implementation of Michel Fortin’s PHP-Markdown Extra that extends the basic Markdown syntax to support tables, definition lists, and id-able headers.
Solar_Markdown_Wiki, which provides Mediawiki-style page links, interwiki links, and code documentation constructs, in addition to tables and definitions lists from the
Solar_Markdown_Extrarules. It is very aggressive about escaping HTML for output, which makes it more suitable for untrusted environments.