RouterFactory

Main interface for Design Driven Router factory Author: Francesco Guardiani @slinkydeveloper

package

Default

Methods

__construct

__construct() 

Add global handler to be applied prior to @see \io\vertx\jphp\ext\web\Router being generated. <br/> Please note that you should not add a body handler inside that list. If you want to modify the body handler, please use @see \io\vertx\jphp\ext\web\api\contract\RouterFactory::setBodyHandler

addGlobalHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

this object

Mount to paths that have to follow a security schema a security handler

addSecurityHandler( $arg0,  $arg1) : $this

Arguments

$arg0

string

$arg1

callable

Response

$this

Get options of router factory. For more info @see \io\vertx\jphp\ext\web\api\contract\RouterFactoryOptions

getOptions() : \io\vertx\jphp\ext\web\api\contract\RouterFactoryOptions

Construct a new router based on spec. It will fail if you are trying to mount a spec with security schemes without assigned handlers<br/> <b>Note:</b> Router is constructed in this function, so it will be respected the path definition ordering.

getRouter() : \io\vertx\jphp\ext\web\Router

getValidationFailureHandler

getValidationFailureHandler() : callable

Response

callable

Supply your own BodyHandler if you would like to control body limit, uploads directory and deletion of uploaded files

setBodyHandler( $arg0) : $this

Arguments

$arg0

BodyHandler

Response

$this

self

When set, this function is called while creating the payload of @see \io\vertx\jphp\ext\web\api\OperationRequest

setExtraOperationContextPayloadMapper( $arg0) : $this

Arguments

$arg0

callable

Response

$this

Set not implemented failure handler. It's called when you don't define an handler for a specific operation. You can enable/disable this feature from

setNotImplementedFailureHandler( $arg0) : $this
see \io\vertx\jphp\ext\web\api\contract\RouterFactoryOptions

Arguments

$arg0

callable

Response

$this

this object

Set options of router factory. For more info @see \io\vertx\jphp\ext\web\api\contract\RouterFactoryOptions

setOptions( $arg0) : $this

Arguments

$arg0

array | RouterFactoryOptions

Response

$this

Set default validation failure handler. You can enable/disable this feature from

setValidationFailureHandler( $arg0) : $this
see \io\vertx\jphp\ext\web\api\contract\RouterFactoryOptions

Arguments

$arg0

callable

Response

$this

this object