ActionController: __construct() as first function
This commit is contained in:
parent
a4955df1a9
commit
4980b700da
|
@ -88,30 +88,6 @@ class ActionController extends Zend_Controller_Action
|
|||
|
||||
private $auth;
|
||||
|
||||
public function Config($file = null)
|
||||
{
|
||||
if ($file === null) {
|
||||
if ($this->config === null) {
|
||||
$this->config = Config::app();
|
||||
}
|
||||
return $this->config;
|
||||
} else {
|
||||
if (! array_key_exists($file, $this->configs)) {
|
||||
$this->configs[$file] = Config::module($module, $file);
|
||||
}
|
||||
return $this->configs[$file];
|
||||
}
|
||||
return $this->config;
|
||||
}
|
||||
|
||||
public function Auth()
|
||||
{
|
||||
if ($this->auth === null) {
|
||||
$this->auth = AuthManager::getInstance();
|
||||
}
|
||||
return $this->auth;
|
||||
}
|
||||
|
||||
/**
|
||||
* The constructor starts benchmarking, loads the configuration and sets
|
||||
* other useful controller properties
|
||||
|
@ -158,6 +134,30 @@ class ActionController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
|
||||
public function Config($file = null)
|
||||
{
|
||||
if ($file === null) {
|
||||
if ($this->config === null) {
|
||||
$this->config = Config::app();
|
||||
}
|
||||
return $this->config;
|
||||
} else {
|
||||
if (! array_key_exists($file, $this->configs)) {
|
||||
$this->configs[$file] = Config::module($module, $file);
|
||||
}
|
||||
return $this->configs[$file];
|
||||
}
|
||||
return $this->config;
|
||||
}
|
||||
|
||||
public function Auth()
|
||||
{
|
||||
if ($this->auth === null) {
|
||||
$this->auth = AuthManager::getInstance();
|
||||
}
|
||||
return $this->auth;
|
||||
}
|
||||
|
||||
protected function moduleInit()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue