2013-10-17 10:28:12 +02:00
|
|
|
<?php
|
|
|
|
|
2016-08-19 00:51:35 +02:00
|
|
|
namespace SilverStripe\View;
|
|
|
|
|
2013-10-17 10:28:12 +02:00
|
|
|
/**
|
|
|
|
* This interface needs to be implemented by any template parser that is used in SSViewer
|
|
|
|
*/
|
|
|
|
interface TemplateParser {
|
2016-08-19 00:51:35 +02:00
|
|
|
|
2013-10-17 10:28:12 +02:00
|
|
|
/**
|
|
|
|
* Compiles some passed template source code into the php code that will execute as per the template source.
|
|
|
|
*
|
2016-08-19 00:51:35 +02:00
|
|
|
* @param string $string The source of the template
|
2013-10-17 10:28:12 +02:00
|
|
|
* @param string $templateName The name of the template, normally the filename the template source was loaded from
|
|
|
|
* @param bool $includeDebuggingComments True is debugging comments should be included in the output
|
2016-08-19 00:51:35 +02:00
|
|
|
* @return string The php that, when executed (via include or exec) will behave as per the template source
|
2013-10-17 10:28:12 +02:00
|
|
|
*/
|
|
|
|
public function compileString($string, $templateName = "", $includeDebuggingComments = false);
|
2016-01-06 00:34:58 +01:00
|
|
|
}
|