1. Go to this page and download the library: Download velliz/pte 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/ */
velliz / pte example snippets
$pte = new Pte(false, true, true);
$pte->SetMaster('template/master.html');
$pte->SetHtml('template/view.html');
class BaseUrl implements \pte\CustomRender
{
var $fn;
var $param;
var $tempJs = '';
var $tempCss = '';
public function Parse($data = null, $template = '', $templateBinary = false)
{
if ($this->fn === 'url') {
return 'http://localhost/' . $this->param;
}
return '';
}
/**
* @param $fnName
* @param $paramArray
*/
public function Register($fnName, $paramArray)
{
$this->fn = $fnName;
$this->param = $paramArray;
}
}