public function loadFile($file, $keyname = "") { if (!file_exists($file)) { throw new Exception("Config file '{$file}' doesn't exist or is not readable"); } else { $cnf = parse_ini_file($file, true); $this->set($cnf, $keyname); return $this; } }