loaded[$file])) { $base = App::getInstance()->resolve('paths.base'); $separator = DIRECTORY_SEPARATOR; $this->loaded[$file] = (array) require "{$base}{$separator}config{$separator}{$file}.php"; } if ($value = $this->withDots($this->loaded[$file], $segments)) { return $value; } return $default; } private function withDots(array $array, array $segments): mixed { $current = $array; foreach ($segments as $segment) { if (!isset($current[$segment])) { return null; } $current = $current[$segment]; } return $current; } }