News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Query7.com:
Writing a module for Kohana3
December 23, 2010 @ 13:57:28

On the Query7 blog there's a new tutorial that will step you through making a module for the Kohana3 framework - a replacement for the Kohana_View view layer included with the framework.

We will be building a module that replaces Kohana's own view layer (Kohana_View). It will use the PHP template library Twig. We want our own view layer to be API compatible with Kohana's view layer. This will ensure that other modules work out of the box and that the only code the developer will need to alter in their application are the templates (so that they are Twig compatible). No code in any controller will need to be modified.

They lay out the directory structure (dropping all files in /modules) and show you how to enable the module. He talks a bit about what Twig is and shows the code needed to initialize it and configure some of its basic settings. They define the "capture()" method and include a sample of using Twig in your controller.

0 comments voice your opinion now!
module tutorial twig view custom kohana3 framework


blog comments powered by Disqus

Similar Posts

SitePoint PHP Blog: Database Versioning with Ladder Migrations

ServerGrove Blog: Symfony2 components overview: Finder

Community News: Symfony Framework Makes Some Updates (v.0.6.2 and Content)

Zend Developer Zone: Paging and Sorting Data with Zend Framework, Doctrine and PEAR (part 1)

Brian Swan's Blog: Using the Windows Azure Tools for Eclipse with PHP


Community Events





Don't see your event here?
Let us know!


language install opinion laravel library bugfix introduction api deployment voicesoftheelephpant interview release community symfony series list package podcast tips framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework