PHP code example of romeoz / rock-template

1. Go to this page and download the library: Download romeoz/rock-template 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/ */

    

romeoz / rock-template example snippets


use rock\template\Template;

$template = new Template;

echo $template->render('/path/to/layout.php', ['foo' => 'world!!!']);


/** @var \rock\template\Template $this */

use rock\template\Template;

echo (new Template)->render('/path/to/layout', ['foo' => 'world!!!']);