getWithFallback($key, $this->group, $this->prefix, $this->postfix); } /** * Fetch an option value from a given key, or, if that specific key does * not contain a value, then consult various fallback options until a * value is found. * */ protected function getWithFallback($key, $group, $prefix = '', $postfix = '.') { $configKey = "{$prefix}{$group}${postfix}{$key}"; if ($this->config->has($configKey)) { return $this->config->get($configKey); } if ($this->config->hasDefault($configKey)) { return $this->config->getDefault($configKey); } $moreGeneralGroupname = $this->moreGeneralGroupName($group); if ($moreGeneralGroupname) { return $this->getWithFallback($key, $moreGeneralGroupname, $prefix, $postfix); } return null; } }