mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 08:44:10 +02:00
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;
|
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
|
* The constructor starts benchmarking, loads the configuration and sets
|
||||||
* other useful controller properties
|
* 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()
|
protected function moduleInit()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user