function template_handler($resource_type, $resource_name, &$source_content, &$source_timestamp, &$smarty) { if ($filepath = Globe::Find($resource_name, array(APP_ROOT . SMARTY_TEMPLATE_DIR . DS, ENDO_ROOT . SMARTY_TEMPLATE_DIR . DS))) { return set_resource($filepath, &$source_content, &$source_timestamp, &$smarty); } else { // not found. set error... Error::Set("Template '" . Globe::CleanDir($filepath) . "' not found!"); return false; } }
public function include_to_buffer($filename) { if ($filepath = Globe::Find($filename, array(APP_ROOT . EXECUTE_DIR, ENDO_ROOT . EXECUTE_DIR))) { ob_start(); include $filepath; $this->output = ob_get_contents(); ob_end_clean(); } else { Error::Set("File '{$filepath}' could not be found!", 'fatal'); } }