function setPath($dir) { $_dir = realpath($dir); if ($_dir === false) { error: if (self::$debug) { trigger_error("config dir[{$dir}] not exists.", E_USER_WARNING); } return false; } $dir = $_dir; if (!is_dir($dir)) { goto error; } if (in_array($dir, $this->config_path)) { if (self::$debug) { trigger_error("config path[{$dir}] is already added.", E_USER_WARNING); } return false; } $this->config_path[] = $dir; self::$active = true; return true; }
function setPath($dir) { $this->config_path[] = $dir; self::$active = true; }