Sponsored Link

Get PHP/HTML code

To get the PHP code after parsing the template, use the toPHP method.

Syntax

$object->toPHP('template-file', $assign);

PHP

$op = new OnePlate();
$code = $op->toPHP('sample.tpl', $assign);
file_put_contents('./template_parsed.php', ); // Write to file


To get the HTML source of after evaluating the PHP code, use the toHTML method.

Syntax

$object->toHTML('template-file', $assign);

PHP

$op = new OnePlate();
$code = $op->toHTML('sample.tpl', $assign);