Begin removing several dependencies on Config object
This commit is contained in:
10
template.h
10
template.h
@@ -11,7 +11,12 @@
|
||||
class Template
|
||||
{
|
||||
private:
|
||||
const Config *config;
|
||||
ConfigVariableResolver *configVarResolver;
|
||||
ConfigUrls *configUrls;
|
||||
|
||||
std::string templateprefix;
|
||||
std::string templatepath;
|
||||
|
||||
std::map<std::string, TemplatePage> pagesMap;
|
||||
std::string resolveIncludes(std::string_view content);
|
||||
|
||||
@@ -21,7 +26,8 @@ class Template
|
||||
TemplatePage createPage(std::string name);
|
||||
|
||||
public:
|
||||
Template(const Config &config);
|
||||
Template(std::string templateprefix, std::string templatepath, ConfigUrls &configUrls,
|
||||
ConfigVariableResolver &configVarsResolver);
|
||||
/* TODO: returning this as a reference is by no means a risk free business,
|
||||
because between requests, different vars can be set conditionally,
|
||||
thus creating a mess
|
||||
|
Fai riferimento in un nuovo problema
Block a user