/home/qwafil/public_html/system/vendor/phroute/phroute/src/Phroute/Dispatcher.php
else
{
$routes[$httpMethod][2][$varName] = $matches[$i + 1];
}
}
return $routes[$httpMethod];
}
throw new HttpRouteNotFoundException('Route ' . $uri . ' does not exist');
}
}
/home/qwafil/public_html/system/vendor/phroute/phroute/src/Phroute/Dispatcher.php
* @throws Exception\HttpRouteNotFoundException
*/
private function dispatchRoute($httpMethod, $uri)
{
if (isset($this->staticRouteMap[$uri]))
{
return $this->dispatchStaticRoute($httpMethod, $uri);
}
return $this->dispatchVariableRoute($httpMethod, $uri);
}
/**
* Handle the dispatching of static routes.
*
* @param $httpMethod
* @param $uri
* @return mixed
* @throws Exception\HttpMethodNotAllowedException
*/
/home/qwafil/public_html/system/vendor/phroute/phroute/src/Phroute/Dispatcher.php
/**
* Dispatch a route for the given HTTP Method / URI.
*
* @param $httpMethod
* @param $uri
* @return mixed|null
*/
public function dispatch($httpMethod, $uri)
{
list($handler, $filters, $vars) = $this->dispatchRoute($httpMethod, trim($uri, '/'));
list($beforeFilter, $afterFilter) = $this->parseFilters($filters);
if(($response = $this->dispatchFilters($beforeFilter)) !== null)
{
return $response;
}
$resolvedHandler = $this->handlerResolver->resolve($handler);
/home/qwafil/public_html/system/o2/classes/app.php
}
}
}
protected static function dispatch($router)
{
$dispatcher = new Dispatcher($router->getData());
$base_url = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$base_url = trim_string($base_url, config('app.base_folder'));
$callback_response = $dispatcher->dispatch($_SERVER['REQUEST_METHOD'], $base_url);
if (is_callable(static::$finish))
call_user_func(static::$finish);
if ($callback_response) {
response($callback_response);
}
}
}
/home/qwafil/public_html/system/o2/classes/app.php
if ($attributes[0] == config('app.admin'))
App::$is_admin = true;
$router = App::$router;
require_once APP_FOLDER . 'route.php';
if (App::$is_admin) require_once ADMIN_FOLDER . 'route.php';
require_once APP_FOLDER . '/filters.php';
App::$router = $router;
if (config('app.debug') or Auth::dev()) {
Extensions::debug();
self::dispatch($router);
} else {
try {
self::dispatch($router);
} catch (\Phroute\Phroute\Exception\HttpRouteNotFoundException $exception) {
app_log($exception->getMessage());
abort(404);
} catch (Exception $exception) {
app_log($exception->getMessage());
abort(500);
}
/home/qwafil/public_html/index.php
<?php
require_once 'start.php';
date_default_timezone_set(Config::get('app.time_zone'));
//if (config('app.debug'))
// Extensions::debug();
$app = new App();
$app->run();
//todo see what is recipe vendor !!!