PHP Classes

File: test/index.php

Recommend this page to a friend!
  Classes of Mohamed Nabil   PHP Style Template Engine   test/index.php   Download  
File: test/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Style Template Engine
Process templates compiling them into PHP scripts
Author: By
Last change:
Date: 1 year ago
Size: 405 bytes
 

Contents

Class file image Download
<?php


use Style\Style;



//view you want to compile must has .stl at the end of it is name

$style = new Style('template/','template/temp/');

// add new template role using the below callback function that has the full experssion in $capt var

$style->addTempRole('test','\~ob',function($capt){
      return
$capt[0].' ppppppppppppppppppoboobobo';
});

//render view

$style->render('page_sections',[]);