|
|
@ -58,6 +58,13 @@ class Aauth |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected $session; |
|
|
|
protected $session; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Array with modules |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @var array |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
protected $modules = []; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Array to store error messages |
|
|
|
* Array to store error messages |
|
|
|
* |
|
|
|
* |
|
|
@ -124,6 +131,7 @@ class Aauth |
|
|
|
$this->configApp = new \Config\App(); |
|
|
|
$this->configApp = new \Config\App(); |
|
|
|
$this->config = $config; |
|
|
|
$this->config = $config; |
|
|
|
$this->session = $session; |
|
|
|
$this->session = $session; |
|
|
|
|
|
|
|
$this->modules = $this->config->modules; |
|
|
|
|
|
|
|
|
|
|
|
$this->cachePermIds = []; |
|
|
|
$this->cachePermIds = []; |
|
|
|
$this->cacheGroupIds = []; |
|
|
|
$this->cacheGroupIds = []; |
|
|
@ -2788,4 +2796,29 @@ class Aauth |
|
|
|
$this->flashInfos = []; |
|
|
|
$this->flashInfos = []; |
|
|
|
$this->session->remove('infos'); |
|
|
|
$this->session->remove('infos'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Provides direct access to method in the builder (if available) |
|
|
|
|
|
|
|
* and the database connection. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param string $name |
|
|
|
|
|
|
|
* @param array $params |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return Model|null |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function __call($name, array $params) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
foreach ($this->modules as $module) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$module = '\\App\\Libraries\\Aauth\\' . $module; |
|
|
|
|
|
|
|
$moduleClass = new $module; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (method_exists($moduleClass, $name)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return $moduleClass->$name(...$params); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trigger_error('Call to undefined method ' . __CLASS__ . '::' . $name . '()', E_USER_ERROR); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|