__construct()
allowMethod()
controller()
name()
respondsTo()
route()
via()
Route
Encapsulates the route, the callback to execute, and the methods it will respond to.
category | Phlyty |
---|---|
package | Phlyty |
__construct(\Zend\Mvc\Router\RouteInterface $route, \Phlyty\callable $controller)
Accepts the router and controller.
\Zend\Mvc\Router\RouteInterface
\Phlyty\callable
allowMethod(string $method) : void
string
controller() : \Phlyty\callable
name(null | string $name) : \Phlyty\Route | string
Sets the route name if a non-empty string is provided, and then returns the Route instance to allow a fluent interface.
Otherwise, returns the route name.
nullstring
\Phlyty\Route
string
respondsTo(null | string $method) : array | bool
If no method is provided, returns array of all methods to which this route will respond.
nullstring
array
bool
route() : \Zend\Mvc\Router\RouteInterface
\Zend\Mvc\Router\RouteInterface
via(string | array $method) : \Phlyty\Route
Additional arguments will be used as additional methods.
stringarray
\Phlyty\Exception\InvalidMethodException |
---|