Exemplo n.º 1
0
 /**
  * Get a single or multiple config values by key
  *
  * @param   string|array  a single key or multiple in an array, empty to fetch all
  * @param   mixed         default output when config wasn't set
  * @return  mixed|array   a single config value or multiple in an array when $key input was an array
  */
 public function get_config($key = null, $default = null)
 {
     if ($key === null) {
         return $this->fieldset->get_config();
     }
     if (is_array($key)) {
         $output = array();
         foreach ($key as $k) {
             $output[$k] = $this->fieldset->get_config($k, null) !== null ? $this->fieldset->get_config($k, $default) : \Config::get('form.' . $k, $default);
         }
         return $output;
     }
     return $this->fieldset->get_config($key, null) !== null ? $this->fieldset->get_config($key, $default) : \Config::get('form.' . $key, $default);
 }