PHP code example of dnl / mthaml-bundle

1. Go to this page and download the library: Download dnl/mthaml-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dnl / mthaml-bundle example snippets

 sh
$ php bin/vendors install
 php

// app/autoload.php

$loader->registerNamespaces(array(
    // ...
    'MtHaml'       => __DIR__ . '/../vendor/MtHaml/lib',
    'MtHamlBundle' => __DIR__ . '/../vendor/bundles',
));
 php

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new MtHamlBundle\MtHamlBundle(),
    );
}
 php
/**
 * @Template(engine="haml")
 */
public function fooAction() {
 php
/**
 * @Haml
 */
public function fooAction() {
 php
public function bazAction() {
    $this->render('FooBundle:Bar:baz.html.haml');
}
 php
/**
 * @View(engine="haml")
 */
public function fooAction() {