Merge pull request #430 from Tahrz/master

fix for __invoke methods (if there are only in class (Action))
This commit is contained in:
Simon Sessingø
2018-11-25 00:27:54 +01:00
committed by GitHub
+4
View File
@@ -109,6 +109,10 @@ abstract class Route implements IRoute
$router->debug('Loading class %s', $className);
$class = $router->getClassLoader()->loadClass($className);
if (count($controller) === 1) {
$controller[1] = '__invoke';
}
$method = $controller[1];
if (method_exists($class, $method) === false) {