[FEATURE] Added class + method loading to IClassLoader.

This commit is contained in:
Simon Sessingø
2021-03-29 22:15:55 +02:00
parent 5621ffc724
commit dd9a6eab7d
4 changed files with 37 additions and 4 deletions
+2 -2
View File
@@ -97,9 +97,9 @@ abstract class Route implements IRoute
throw new ClassNotFoundHttpException($className, $method, sprintf('Method "%s" does not exist in class "%s"', $method, $className), 404, null);
}
$router->debug('Executing callback');
$router->debug('Executing callback %s -> %s', $className, $method);
return call_user_func_array([$class, $method], $parameters);
return $router->getClassLoader()->loadClassMethod($class, $method, $parameters);
}
protected function parseParameters($route, $url, $parameterRegex = null): ?array