public function getCallable($method, $uri)
{
$routeInfo = $this->getDispatcher()->dispatch($method, $uri);
switch ($routeInfo[0]) {
case Dispatcher::NOT_FOUND:
throw new \Exception('404 Not Found');
case Dispatcher::METHOD_NOT_ALLOWED:
throw new \Exception('405 Method Not Allowed');
case Dispatcher::FOUND:
$handler = $routeInfo[1];
$parameters = $routeInfo[2];
return [$handler, $parameters];
}
}