Major overhaul

This commit is contained in:
Simon Sessingø
2016-11-19 19:24:05 +01:00
parent ba719cf880
commit 7e63197252
21 changed files with 526 additions and 282 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
<?php
namespace Pecee\SimpleRouter;
use Pecee\Exception\RouterException;
use Pecee\Http\Request;
use Pecee\SimpleRouter\Exceptions\NotFoundHttpException;
class RouterResource extends LoadableRoute implements IControllerRoute
{
@@ -27,7 +27,7 @@ class RouterResource extends LoadableRoute implements IControllerRoute
$method = strtolower($controller[1]);
if (!method_exists($class, $method)) {
throw new RouterException(sprintf('Method %s does not exist in class %s', $method, $className), 404);
throw new NotFoundHttpException(sprintf('Method %s does not exist in class %s', $method, $className), 404);
}
call_user_func_array([$class, $method], $this->getParameters());