/** * Setup the Path variable * * @param string $base base path * @return void */ protected static function _setPath($base = null) { if (empty($base)) { self::$path = '/'; return; } if (strpos($base, 'index.php') !== false) { $base = str_replace('index.php', '', $base); } if (strpos($base, '?') !== false) { $base = str_replace('?', '', $base); } self::$path = $base; }