Example #1
0
 private function get_info()
 {
     /* verifica url com index.php */
     preg_match('/(.*)\\/index.php(.*)/', $_SERVER["PHP_SELF"], $matches);
     /* relative uri base */
     $relative_uri_base = $matches[1];
     /* route path information */
     $path_info = $matches[2];
     $url = Request::singleton()->getUrl();
     /* verifica url sem index.php */
     if (!preg_match('/index.php/', $url->getPath())) {
         $path_info = str_replace($relative_uri_base, '', $url->getPath());
     }
     /* define url root */
     define(strtoupper(Config::get_root_path()), $relative_uri_base . '/');
     $path_info = trim($path_info, '/');
     return $path_info;
 }
Example #2
0
 public function __construct()
 {
     parent::__construct($_GET);
 }