/** * @param null $path * @param null $default * @return Config|null */ public function getConfig($path = null, $default = null) { if (!$this->config instanceof Config) { return is_array($default) ? new Config([]) : $default; } if ($path) { return $this->config->get($path, $default); } return $this->config; }
public function getConfig($path = null, $default = null) { if (is_null($path)) { if (is_null($this->config)) { return new Config([]); } return $this->config; } else { return !is_null($this->config) ? $this->config->get($path, $default) : $default; } }
/** * @param null $path * @param null $default * @return Config */ public function getConfig($path = null, $default = null) { if (is_null($this->config)) { $this->config = $this->getConfigLoader()->getConfig(); } return $this->config->get($path, $default); }