Webiny\Component\Router\Route\Route::setCallback PHP Method

setCallback() public method

Set the route callback.
public setCallback ( string | array $callback )
$callback string | array Callback that will be attached to this route. Note that this callback can be overwritten during the routing process.
    public function setCallback($callback)
    {
        $this->callback = $callback;
        return $this;
    }