Twig for CakePHP: Updates

New features have been added to TwigView just recently. New filters, Better readme, Access to view object and experimental CakePHP 2.0-dev support.

CakePHP 2.x Support
This one is experimental. Using changes made by BigClick in his fork i’ve remodeled the methods to act as proxy and detect if 2.x is being used. So this feature is completely transparent and the plugin will work in 1.2+, 1.3x and 2.0-dev without any changes required. At least in my quick tests it did ;) Enjoy.
View Object
You can now access the view object within a template
{{ _view.action }} //=> 'display'
Two new filter sets
‘basic’ und ‘number’ and as the name suggest are shortcuts to the NumberHelper (me) and basic.php (Hiroshi Hoaki)
Display the debug (pre+print_r) output
{{ user|debug }}
Display just the print_r output
{{ user|pr }}
Display the value from a environment variable
{{ 'HTTP_HOST'|env }}
Convert byte integer to a humand readable size
{{ '3535839525'|size }} //=> 3.29 GB
Formats a number with a level of precision.
{{ '0.555'|p(2) }} //=> 0.56
Display floating point value as currency value. USD, GBP and EUR only
{{ '5999'|curr }} // default, $5,999.00
{{ '5999'|curr('GBP') }} // £5,999.00
{{ '5999'|curr('EUR') }} // €5.999,00

Formats a number into a percentage string.
{{ '2.3'|pct }} //=> 2.30%
Fancy Readme
I’ve added a decent readme with install and usage instructions.
https://github.com/m3nt0r/cakephp-twig-view