/** * Builds the statement object with string and markers. * * @param string $text Statement as text * @param string $begin Marker for start sequence with '*' as wildcard * @param string $end Marker for stop sequence with '*' as wildcard * @return MW_Template_Interface */ public function __construct($text, $begin = '/*-$*/', $end = '/*$-*/') { parent::__construct($text, $begin, $end); }
public function testSubstituteBadTemplate() { $template = ' <html> <head><title>Template test</title></head> <body> <!--###TEMPLATE--> test template <!--###LIST--> <!--###ITEM--> <div><!--###NUM-->1<!--NUM###--> <!--###TEXT-->example text<!--TEXT###--></div> <!--LIST###--> <!--TEMPLATE###--> </body> </html> '; $_object = new MW_Template_Base($template, '<!--###$-->', '<!--$###-->'); $this->setExpectedException('MW_Template_Exception'); $_object->substitute(array('ITEM' => 'Title')); }
/** * Builds the template object with string and markers * * @param string $text Template as text with Typo3-like markers * @param string $begin Marker for start sequence with '*' as wildcard * @param string $end Marker for stop sequence with '*' as wildcard * @return MW_Template_Interface */ public function __construct($text, $begin = '<!--###$-->', $end = '<!--$###-->') { parent::__construct($text, $begin, $end); }