filepath = 'db4:'; $source->uid = sha1($source->resource); $source->timestamp = 0; $source->exists = true; } public function getContent(Smarty_Template_Source $source) { if ($source->is_config) { return "foo = 'bar'\n"; } return '{$x="hello world"}{$x}'; } }