MrAnchovy / Kohana_Smarty3

Integration of Smarty v3 with the Kohana PHP Framework
25 stars 13 forks source link

Smarty3 Module for Kohana

This is a module for the Kohana PHP framework that integrates the Smarty Template Engine.

Documentation and support for this module can be found on Github. Note this version is compatible with Kohana 3.3. For Kohana 3.0-3.2 you want the 1.x branch.

Version 2.0.3-dev

Quick Start

Upgrading from earlier Version 2 releases

Upgrading from older versions

Upgrading from older versions should work as above.

How does this magic work?

The Smarty module creates a View class that extends Kohana_View to intercept the View::factory() method and return an instance of either the unmodified Kohana_View for a PHP template or an instance of Smarty_View if the view file has the .tpl extension. Smarty_View implements the methods of Kohana_View to act on a Smarty object. If you are converting existing code, or just prefer to use the Smarty object directly, you can access it with $view->smarty(), but note that not all of the available methods have been tested and may produce unpredicatable effects.

More information

Documentation and support for this module can be found on Github. Support for Smarty and its standard plugins is of course on the Smarty site.

Copyright

Licence

This distribution of the Smarty3 Module for Kohana is released under the Kohana License

The distribution of Smarty included in this package is released under the GNU Lesser General Public License (LGPL) - see the Smarty documentation for more details.