Skip to content
/ HamlPHP Public
forked from hamlphp/HamlPHP

Yet another Haml to HTML converter written in PHP.

License

Notifications You must be signed in to change notification settings

Jtiem/HamlPHP

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HamlPHP

Yet another Haml to HTML converter written in PHP.

Requirements

PHP 5.2 or newer.

Usage

index.haml

!!! 5
%html
    %body
        #container
            %ul.navigation
                %li Etusivu
                %li Tuotteet
            
            %h2 Tuotteet
            %ul.products 
                %li= 1 * 6
                - for ($i = 0; $i < 10; $i++)
                    %li= $i + 3

In your index.php

<?php

require_once 'src/HamlPHP/HamlPHP.php';
require_once 'src/HamlPHP/Storage/FileStorage.php';

// Make sure that a directory _tmp_ exists in your application and it is writable.
$parser = new HamlPHP(new FileStorage(dirname(__FILE__) . '/tmp/'));

$content = $parser->parseFile('index.haml');

echo $content;

About

Yet another Haml to HTML converter written in PHP.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published