Coder Social home page Coder Social logo

silex-mthaml's Introduction

Silex-MtHaml

HAML templating for Silex using the MtHaml PHP HAML parser.

Features

  • Acts as a Twig preprocessor: Supports Twig functions, filters, macros, blocks, inheritance, expressions and every Twig features
  • Mix Twig and HAML templates: You can include, extend, use and import Twig templates from HAML templates, and vice versa.
  • High performance: Templates are compiled to PHP code and cached, no parsing or runtime overhead.
  • HAML syntax supported by editors

Installation

Install using composer:

$ composer require mthaml/silex-mthaml:*

Then register the service provider:

<?php

// after $app->register(new Silex\Provider\TwigServiceProvider() [...]
$app->register(new SilexMtHaml\MtHamlServiceProvider());

Usage

Name your template with a .haml suffix, and call render as usual.

Syntax

See MtHaml docs

silex-mthaml's People

Contributors

arnaud-lb avatar boorj avatar

Stargazers

tssmits avatar Alex avatar  avatar hunslater avatar Stefan Stührmann avatar Jérémy Barbe avatar Mathew Davies avatar David avatar

Watchers

 avatar James Cloos avatar hunslater avatar  avatar  avatar

Forkers

boorj

silex-mthaml's Issues

Composer can't use updated version

Arnaud @arnaud-lb , am I doing something wrong, or composer doesn't update Lexer.php during php composer update or php composer require mthaml/silex-mthaml ?

Maybe version should be raised to 1.0.2 / 1.1 ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.