add prefilter

This commit is contained in:
uwetews
2016-01-02 00:43:44 +01:00
parent cc68ce89ec
commit eee2bc3a77

View File

@@ -557,6 +557,20 @@ KEY `expire` (`expire`)
}
}
/**
* prefilter to insert test number
*
* @param string $source
* @param \Smarty_Internal_Template $tpl
*
* @return string
*/
public function prefilterTest($source, Smarty_Internal_Template $tpl)
{
return str_replace('#test#', "test:{\$test nocache} compiled:{$tpl->getTemplateVars('test')} rendered:{\$test}",
$source);
}
/**
* Tears down the fixture
* This method is called after a test is executed.