* It is possible to specify a specific route via string as well (EG: For redirects in old code paths and the like).
*/
public function Route($route = NULL) {
$route = ($route === NULL) ? trim(strtok($_SERVER["REQUEST_URI"], '?'), '/') : $route;
if (empty($route)) {
return $this->Route('*');
}
// Exact match.
if ($this->routes->offsetExists($route)) {
return $this->PathFinder($this->routes->offsetGet($route), $route);
}
// Regex match. I'm sure someone who's brighter than I am has a better solution for this in 30 lines or less.
foreach ($this->routes as $pattern => $path) {
if (@preg_match($this->RegexifyPattern($pattern), NULL) !== FALSE) {
if (preg_match($this->RegexifyPattern($pattern), $route, $variables) > 0) {
array_shift($variables);
return $this->PathFinder($path, $pattern, $variables);
}
}
}
return $this->Route('404');
}
/*
* Configuration and private functions.
*/
private $routes;
private $modules;No arguments.
* It is possible to specify a specific route via string as well (EG: For redirects in old code paths and the like).
*/
public function Route($route = NULL) {
$route = ($route === NULL) ? trim(strtok($_SERVER["REQUEST_URI"], '?'), '/') : $route;
if (empty($route)) {
return $this->Route('*');
}
// Exact match.
if ($this->routes->offsetExists($route)) {
return $this->PathFinder($this->routes->offsetGet($route), $route);
}
// Regex match. I'm sure someone who's brighter than I am has a better solution for this in 30 lines or less.
foreach ($this->routes as $pattern => $path) {
if (@preg_match($this->RegexifyPattern($pattern), NULL) !== FALSE) {
if (preg_match($this->RegexifyPattern($pattern), $route, $variables) > 0) {
array_shift($variables);
return $this->PathFinder($path, $pattern, $variables);
}
}
}
return $this->Route('404');
}
/*
* Configuration and private functions.
*/
private $routes;
private $modules;No arguments.
<?php
declare(strict_types=1);
require_once('includes/loader.php');
\Origin\Router\Router::Get()->Route();No arguments.
* It is possible to specify a specific route via string as well (EG: For redirects in old code paths and the like).
*/
public function Route($route = NULL) {
$route = ($route === NULL) ? trim(strtok($_SERVER["REQUEST_URI"], '?'), '/') : $route;
if (empty($route)) {
return $this->Route('*');
}
// Exact match.
if ($this->routes->offsetExists($route)) {
return $this->PathFinder($this->routes->offsetGet($route), $route);
}
// Regex match. I'm sure someone who's brighter than I am has a better solution for this in 30 lines or less.
foreach ($this->routes as $pattern => $path) {
if (@preg_match($this->RegexifyPattern($pattern), NULL) !== FALSE) {
if (preg_match($this->RegexifyPattern($pattern), $route, $variables) > 0) {
array_shift($variables);
return $this->PathFinder($path, $pattern, $variables);
}
}
}
return $this->Route('404');
}
/*
* Configuration and private functions.
*/
private $routes;
private $modules; No arguments.
* It is possible to specify a specific route via string as well (EG: For redirects in old code paths and the like).
*/
public function Route($route = NULL) {
$route = ($route === NULL) ? trim(strtok($_SERVER["REQUEST_URI"], '?'), '/') : $route;
if (empty($route)) {
return $this->Route('*');
}
// Exact match.
if ($this->routes->offsetExists($route)) {
return $this->PathFinder($this->routes->offsetGet($route), $route);
}
// Regex match. I'm sure someone who's brighter than I am has a better solution for this in 30 lines or less.
foreach ($this->routes as $pattern => $path) {
if (@preg_match($this->RegexifyPattern($pattern), NULL) !== FALSE) {
if (preg_match($this->RegexifyPattern($pattern), $route, $variables) > 0) {
array_shift($variables);
return $this->PathFinder($path, $pattern, $variables);
}
}
}
return $this->Route('404');
}
/*
* Configuration and private functions.
*/
private $routes;
private $modules; No arguments.
<?php
declare(strict_types=1);
require_once('includes/loader.php');
\Origin\Router\Router::Get()->Route(); No arguments.
No data
No data
No data
| Host | www.kibular.com |
| Accept-Encoding | gzip, br, zstd, deflate |
| User-Agent | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
| Accept | */* |
| Content-Length | |
| Content-Type |
| USER | www-data |
| HOME | /var/www |
| HTTP_HOST | www.kibular.com |
| HTTP_ACCEPT_ENCODING | gzip, br, zstd, deflate |
| HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
| HTTP_ACCEPT | */* |
| REDIRECT_STATUS | 200 |
| SERVER_NAME | kibular.com |
| SERVER_PORT | 443 |
| SERVER_ADDR | 95.111.240.119 |
| REMOTE_USER | |
| REMOTE_PORT | 6672 |
| REMOTE_ADDR | 216.73.216.27 |
| SERVER_SOFTWARE | nginx/1.24.0 |
| GATEWAY_INTERFACE | CGI/1.1 |
| HTTPS | on |
| REQUEST_SCHEME | https |
| SERVER_PROTOCOL | HTTP/1.1 |
| DOCUMENT_ROOT | /var/www/9b9t2 |
| DOCUMENT_URI | /sitemap.xml |
| REQUEST_URI | /sitemap.xml |
| SCRIPT_NAME | /sitemap.xml |
| CONTENT_LENGTH | |
| CONTENT_TYPE | |
| REQUEST_METHOD | GET |
| QUERY_STRING | |
| SCRIPT_FILENAME | /var/www/9b9t2/index.php |
| PATH_INFO | |
| FCGI_ROLE | RESPONDER |
| PHP_SELF | /sitemap.xml |
| REQUEST_TIME_FLOAT | 1765084004.0731 |
| REQUEST_TIME | 1765084004 |