A router receives request from an @see \io\vertx\jphp\core\http\HttpServer and routes it to the first matching
see |
that it contains. A router can contain many routes. Routers are also used for routing failures. |
---|---|
package |
Default |
__construct()
accept( $arg0) : void
see |
\io\vertx\jphp\core\http\HttpServer::requestHandler
and pass it to this method. The router then routes it to matching routes. This method is now deprecated you can use this object directly as a request handler, which means there is no need for a method reference anymore. |
---|---|
deprecated |
HttpServerRequest
clear() : $this
$this
a reference to this, so the API can be used fluently
connect( $arg0 = null) : \io\vertx\jphp\ext\web\Route
connect()
Add a route that matches a HTTP CONNECT request and the specified path
param $path [string] URI paths that begin with this path will match connect($path)
string
\io\vertx\jphp\ext\web\Route
the route
connectWithRegex( $arg0) : \io\vertx\jphp\ext\web\Route
delete( $arg0 = null) : \io\vertx\jphp\ext\web\Route
delete()
Add a route that matches a HTTP DELETE request and the specified path
param $path [string] URI paths that begin with this path will match delete($path)
string
\io\vertx\jphp\ext\web\Route
the route
deleteWithRegex( $arg0) : \io\vertx\jphp\ext\web\Route
errorHandler( $arg0, $arg1) : \io\vertx\jphp\ext\web\Router
The handler will be called when the context fails and other failure handlers didn't write the reply or when an exception is thrown inside an handler. You must not use @see \io\vertx\jphp\ext\web\RoutingContext::next inside the error handler This does not affect the normal failure routing logic.
integer
callable
\io\vertx\jphp\ext\web\Router
a reference to this, so the API can be used fluently
exceptionHandler( $arg0) : $this
deprecated |
---|
callable
$this
a reference to this, so the API can be used fluently
get( $arg0 = null) : \io\vertx\jphp\ext\web\Route
get()
Add a route that matches a HTTP GET request and the specified path
param $path [string] URI paths that begin with this path will match get($path)
string
\io\vertx\jphp\ext\web\Route
the route
getRoutes() : array
array
a list of all the routes on this router
getWithRegex( $arg0) : \io\vertx\jphp\ext\web\Route
handle( $arg0) : void
HttpServerRequest
handleContext( $arg0) : void
RoutingContext
handleFailure( $arg0) : void
RoutingContext
head( $arg0 = null) : \io\vertx\jphp\ext\web\Route
head()
Add a route that matches a HTTP HEAD request and the specified path
param $path [string] URI paths that begin with this path will match head($path)
string
\io\vertx\jphp\ext\web\Route
the route
headWithRegex( $arg0) : \io\vertx\jphp\ext\web\Route
mountSubRouter( $arg0, $arg1) : $this
string
Router
$this
a reference to this, so the API can be used fluently
patch( $arg0 = null) : \io\vertx\jphp\ext\web\Route
patch()
Add a route that matches a HTTP PATCH request and the specified path
param $path [string] URI paths that begin with this path will match patch($path)
string
\io\vertx\jphp\ext\web\Route
the route
patchWithRegex( $arg0) : \io\vertx\jphp\ext\web\Route
post( $arg0 = null) : \io\vertx\jphp\ext\web\Route
post()
Add a route that matches a HTTP POST request and the specified path
param $path [string] URI paths that begin with this path will match post($path)
string
\io\vertx\jphp\ext\web\Route
the route
postWithRegex( $arg0) : \io\vertx\jphp\ext\web\Route
put( $arg0 = null) : \io\vertx\jphp\ext\web\Route
put()
Add a route that matches a HTTP PUT request and the specified path
param $path [string] URI paths that begin with this path will match put($path)
string
\io\vertx\jphp\ext\web\Route
the route
putWithRegex( $arg0) : \io\vertx\jphp\ext\web\Route
route( $arg0 = null, $arg1 = null) : \io\vertx\jphp\ext\web\Route
route()
Add a route that matches the specified path
param $path [string] URI paths that begin with this path will match route($path)
Add a route that matches the specified HTTP method and path
param $method [string] the HTTP method to match param $path [string] URI paths that begin with this path will match route($method, $path)
string
string
\io\vertx\jphp\ext\web\Route
the route
router( $arg0) : \io\vertx\jphp\ext\web\Router
routeWithRegex( $arg0, $arg1 = null) : \io\vertx\jphp\ext\web\Route
param $regex [string] URI paths that begin with a match for this regex will match routeWithRegex($regex)
Add a route that matches the specified HTTP method and path regex
param $method [string] the HTTP method to match param $regex [string] URI paths that begin with a match for this regex will match routeWithRegex($method, $regex)
string
string
\io\vertx\jphp\ext\web\Route
the route
trace( $arg0 = null) : \io\vertx\jphp\ext\web\Route
trace()
Add a route that matches a HTTP TRACE request and the specified path
param $path [string] URI paths that begin with this path will match trace($path)
string
\io\vertx\jphp\ext\web\Route
the route
traceWithRegex( $arg0) : \io\vertx\jphp\ext\web\Route