public function set_path() { if (isset($_GET['p'])) { $path = $_GET['p']; } else { $base_url = rtrim(dirname(self::script_name())); $start_url = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_NAME'] . (isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : ''); if (strpos($start_url, '?')) { list($start_url) = explode('?', $start_url, 2); } if ('/' != $base_url) { $start_url = str_replace($base_url, '', $start_url); } $path = trim($start_url, '/'); } self::$fullpath = $path; self::$path = explode('/', $path); }
/** * Returns the path to the configuration file. * * @return string */ public static function path() { return Application::path('config.php'); }
/** * @param \Application $app * @return \Symfony\Component\HttpFoundation\RedirectResponse */ public function index(\Application $app) { return $app->redirect($app->path('hello', array('name' => 'World'))); }
/** * Tests whether all permissions which are required during installation are * available. * * @return bool */ public static function testRequiredPermissions() { $cfgpath = ConfigFile::path(); $iipath = Application::path('.installation'); return self::testWritePermissions($cfgpath) && self::testWritePermissions($iipath); }