/home/autokatalogi/catalogEngine/de-v1/vendor/izniburak/router/src/Router/RouterException.php
class RouterException
{
/**
* @var bool $debug Debug mode
*/
public static $debug = false;
/**
* Create Exception Class.
*
* @param $message
*
* @return string
* @throws Exception
*/
public function __construct($message)
{
if (self::$debug) {
throw new Exception($message, 1);
} else {
die('<h2>Opps! An error occurred.</h2> ' . $message);
}
}
}
Arguments
"Route not found. Looks like something went wrong. Please try again."
/home/autokatalogi/catalogEngine/de-v1/vendor/izniburak/router/src/Router.php
* Get all Routes
*
* @return mixed
*/
public function getRoutes()
{
return $this->routes;
}
/**
* Throw new Exception for Router Error
*
* @param $message
*
* @return RouterException
* @throws
*/
public function exception($message = '')
{
return new RouterException($message);
}
/**
* RouterCommand class
*
* @return RouterCommand
*/
public function routerCommand()
{
return RouterCommand::getInstance($this->baseFolder, $this->paths, $this->namespaces);
}
/**
* Cache all routes
*
* @return bool
* @throws Exception
*/
public function cache()
{
Arguments
"Route not found. Looks like something went wrong. Please try again."
/home/autokatalogi/catalogEngine/de-v1/vendor/izniburak/router/src/Router.php
}, $matched);
$this->runRouteCommand($data['callback'], $matched);
$this->runRouteMiddleware($data, 'after');
break;
}
}
}
}
// If it originally was a HEAD request, clean up after ourselves by emptying the output buffer
if (strtoupper($_SERVER['REQUEST_METHOD']) === 'HEAD') {
ob_end_clean();
}
if ($foundRoute === false) {
if (!$this->errorCallback) {
$this->errorCallback = function () {
header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
return $this->exception('Route not found. Looks like something went wrong. Please try again.');
};
}
call_user_func($this->errorCallback);
}
}
/**
* Routes Group
*
* @param string $name
* @param closure|array $settings
* @param null|closure $callback
*
* @return bool
*/
public function group($name, $settings = null, $callback = null)
{
if ($this->cacheLoaded) {
return true;
}
Arguments
"Route not found. Looks like something went wrong. Please try again."
/home/autokatalogi/catalogEngine/de-v1/vendor/izniburak/router/src/Router.php
$this->runRouteMiddleware($data, 'after');
break;
}
}
}
}
// If it originally was a HEAD request, clean up after ourselves by emptying the output buffer
if (strtoupper($_SERVER['REQUEST_METHOD']) === 'HEAD') {
ob_end_clean();
}
if ($foundRoute === false) {
if (!$this->errorCallback) {
$this->errorCallback = function () {
header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
return $this->exception('Route not found. Looks like something went wrong. Please try again.');
};
}
call_user_func($this->errorCallback);
}
}
/**
* Routes Group
*
* @param string $name
* @param closure|array $settings
* @param null|closure $callback
*
* @return bool
*/
public function group($name, $settings = null, $callback = null)
{
if ($this->cacheLoaded) {
return true;
}
$group = [];
$group['route'] = $this->clearRouteName($name);
/home/autokatalogi/catalogEngine/de-v1/vendor/izniburak/router/src/Router.php
$this->runRouteMiddleware($data, 'after');
break;
}
}
}
}
// If it originally was a HEAD request, clean up after ourselves by emptying the output buffer
if (strtoupper($_SERVER['REQUEST_METHOD']) === 'HEAD') {
ob_end_clean();
}
if ($foundRoute === false) {
if (!$this->errorCallback) {
$this->errorCallback = function () {
header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
return $this->exception('Route not found. Looks like something went wrong. Please try again.');
};
}
call_user_func($this->errorCallback);
}
}
/**
* Routes Group
*
* @param string $name
* @param closure|array $settings
* @param null|closure $callback
*
* @return bool
*/
public function group($name, $settings = null, $callback = null)
{
if ($this->cacheLoaded) {
return true;
}
$group = [];
$group['route'] = $this->clearRouteName($name);
Arguments
/home/autokatalogi/catalogEngine/de-v1/index.php
* Routes loaded from website directory/config/routes.php
* */
$router->group('/', ['before' => 'MainMiddleware'], function ($r) {
foreach (config('routes') as $routeName => $route) {
$method = isset($route['method']) ? $route['method'] : 'get';
if (isset($route['middleware'])) {
$r->$method(route($routeName, [], true), ['before' => $route['middleware']], $route['controller']);
} else {
$r->$method(route($routeName, [], true), $route['controller']);
}
}
$r->get('/clear-cache', 'ApiController@clearCache');
});
if(parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH) == '/phpliteadmin.php') {
require realpath(__DIR__."/phpliteadmin.php");
exit();
}
try {
$router->run();
} catch (ModelNotFoundException|HttpResponseException|NoPermissionException $e) {
// @TODO inny błąd jeśli nie ma kontrolera, a inny jak nie ma uri - 404
echo Response::view('error.twig', ['errorCode' => $e->getCode()])->withStatus($e->getCode())->perform();
}
/home/autokatalogi/public_html/leabox24.de/public/index.php
<?php
include "../../../catalogEngine/de-v1/index.php";
Arguments
"/home/autokatalogi/catalogEngine/de-v1/index.php"