ActionController: __construct() as first function

This commit is contained in:
Thomas Gelf 2014-06-22 12:07:50 +02:00
parent a4955df1a9
commit 4980b700da
1 changed files with 24 additions and 24 deletions

View File

@ -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()
{
}