'; foreach($dataset as $macro => $infos) $stream .= ($infos['type']=='list') ? '{{#'.$macro.'}}{{/'.$macro.'}} : '.$infos['desc'].'
' : '{{'.$macro.'}} : '.$infos['desc'].'
'.PHP_EOL; $stream .= ''; return $stream; } public static function from_template($source, $data, $return, $isHtml=true){ $htmlRaw = TextExport::from_template($source, $data, $return, $isHtml); $stream = $return=='stream' ? $htmlRaw : file_get_contents($htmlRaw); if($return!='stream') return $htmlRaw; return $stream; } } ?>