This project has been dropped in favor of kohana3-haml.
Looks like HamlPHP still needs a lot of work. Project is bringed back until bugs in HamlPHP are fixed.
This module is a bridge between the Kohana PHP framework and the PHamlP library.
This module is for Kohana 3.0+.
bootstrap.php
under your application
directory).config/phamlp.php
) to your application's config directory.classes/controller/haml.php
) to your controller directory if you want to customise it..haml
as the file extension.If you would like to take advantage of the Haml controller shipped with this module, simply:
$this->$template
in the controller).controller_name/action_name
convention.If you would like to take control of the view rendering yourself, you can:
Controller_Haml
, or set $this->auto_render
to false.Haml::factory()
instead of View::factory()
, e.g. Haml::factory($view_file, $view_data, $haml_options)
.config/phamlp.php
file - these apply to all Haml templates generated.$this->haml_options
in your controller actions. These overrides the default options.$this->view_data
, e.g. $this->view_data['title'] = 'My Website';
.View::set_global()
/View::bind_global()
or Haml::set_global()
/Haml::bind_global()
to set global view variables.Haml::factory()
returns a View
object, so you may use bind()
, set()
and magic getter/setters on it.Copyright (c) 2010 Fred Wu (http://fredwu.me), released under the MIT license.
Brought to you by Wuit - http://wuit.com.
Currently maintained by Michał Matyas (http://github.com/d4rky-pl)