ARouter
0.1.0
Annotation based router for your projects
|
Public Member Functions | |
__construct () | |
fromPath (string $path, array $args) | |
fromControllerMethod (string $controllerClass, string $method, array $args=[]) | |
Allows generating of URLs in a nice way.
__construct | ( | ) |
UrlBuilder constructor.
fromControllerMethod | ( | string | $controllerClass, |
string | $method, | ||
array | $args = [] |
||
) |
Generate URL from controller and method name.
string | $controllerClass | Name of controller class. |
string | $method | Name of controller's method. |
array | $args | Path arguments. |
fromPath | ( | string | $path, |
array | $args | ||
) |
Generate URL from path pattern.
string | $path | Path pattern. |
array | $args | Path arguments. |
PathArgumentIsMissingException | If path argument is missing for URL generation. |