Add support for getting all config

This commit is contained in:
flynsarmy 2015-02-07 16:30:55 +10:00
parent 99fc380aa3
commit 1d2a1478cc
1 changed files with 8 additions and 1 deletions

View File

@ -85,8 +85,15 @@ class ControllerBehavior extends ExtensionBase
* @param $default Default value if nothing is found
* @return string
*/
public function getConfig($name, $default = null)
public function getConfig($name = null, $default = null)
{
/*
* Return all config
*/
if (is_null($name)) {
return $this->config;
}
/*
* Array field name, eg: field[key][key2][key3]
*/