A route is a holder for a set of criteria which determine whether an HTTP request or failure should be routed to a handler.
| package |
Default |
|---|
__construct()
blockingHandler( $arg0, $arg1 = null) : $this
param $requestHandler [callable] blockingHandler($requestHandler)
Specify a blocking request handler for the route. This method works just like @see \io\vertx\jphp\ext\web\Route::handler excepted that it will run the blocking handler on a worker thread so that it won't block the event loop. Note that it's safe to call context.next() from the blocking handler as it will be executed on the event loop context (and not on the worker thread.
If the blocking handler is ordered it means that any blocking handlers for the same context are never executed concurrently but always in the order they were called. The default value of ordered is true. If you do not want this behaviour and don't mind if your blocking handlers are executed in parallel you can set ordered to false.
param $requestHandler [callable] the blocking request handler param $ordered [boolean] if true handlers are executed in sequence, otherwise are run in parallel blockingHandler($requestHandler, $ordered)
callable
boolean
$this
consumes( $arg0) : $this
string
$thisa reference to this, so the API can be used fluently
disable() : $this
$thisa reference to this, so the API can be used fluently
enable() : $this
$thisa reference to this, so the API can be used fluently
failureHandler( $arg0) : $this
callable
$thisa reference to this, so the API can be used fluently
getPath() : string
stringthe path prefix (if any) for this route
handler( $arg0) : $this
callable
$thisa reference to this, so the API can be used fluently
last() : $this
$thisa reference to this, so the API can be used fluently
method( $arg0) : $this
string
$thisa reference to this, so the API can be used fluently
order( $arg0) : $this
integer
$thisa reference to this, so the API can be used fluently
path( $arg0) : $this
string
$thisa reference to this, so the API can be used fluently
pathRegex( $arg0) : $this
string
$thisa reference to this, so the API can be used fluently
produces( $arg0) : $this
string
$thisa reference to this, so the API can be used fluently
remove() : $this
$thisa reference to this, so the API can be used fluently
setRegexGroupsNames( $arg0) : $this
..
For example: If you declare route with regex \/(?
array
$thisa reference to this, so the API can be used fluently
useNormalisedPath( $arg0) : $this
boolean
$thisa reference to this, so the API can be used fluently