/** * Statically load any INI file. IE \Core\INI::Settings()->toArray() * @param type $name * @param type $args * @return Config */ public static function __callStatic($name, $args) { $ini = new self($name); if ($ini->getNamespace()["__called"]) { return $ini; } else { $file = Env::getConfigPath() . "/{$name}" . self::EXT; if (file_exists($file)) { $ini->loadFile($file); self::$Config[$ini->namespace]["__called"] = true; } else { if (!$ini->namespaceExists()) { throw new Exception("Config File '{$file}' doesn't exist"); } } return $ini; } }