for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/* @description Transformation Style Sheets - Revolutionising PHP templating *
* @author Tom Butler [email protected] *
* @copyright 2017 Tom Butler <[email protected]> | https://r.je/ *
* @license http://www.opensource.org/licenses/bsd-license.php BSD License *
* @version 1.2 */
namespace Transphporm\Formatter;
class HTMLFormatter {
private $templateFunction;
public function __construct(\Transphporm\TSSFunction\Template $templateFunction) {
$this->templateFunction = $templateFunction;
}
public function html($val) {
return $this->templateFunction->run(['<template>' . $val . '</template>']);
public function debug($val) {
ob_start();
var_dump($val);
return $this->html('<pre>' . ob_get_clean() . '</pre>');