You can configure your module easily with the following line in init():
$this->configure($configFile);
If you intend to reuse your module, then the module class is a good place to store module-level data, such as app component, parameters, etc. FYI, module and application share the same base class (as of version 1.0.4)
You can configure your module easily with the following line in init():
$this->configure($configFile);
If you intend to reuse your module, then the module class is a good place to store module-level data, such as app component, parameters, etc. FYI, module and application share the same base class (as of version 1.0.4)
ok, but if I do the following in the init function:
I have do declare $testVar as member of the class. Is there any other way, to get configuration vars outside the controller class without declaring them all in the controller, for more flexibility?
Like application, a module also has params property which can hold module-level parameters. And you can access them using $controller->module->params[$paramName]