src/ha/Access/HTTP/Router/Builder/HTTPRouterBuilderExample.php
public function buildRouter() : HTTPRouter
    {
        // create router dependencies and router instance
        $request = new HTTPInputRequestDefault();
        $response = new HTTPOutputResponseDefault($request);
        $errHandler = new HTTPErrorHandlerDefault();
        $router = new HTTPRouterDefault($request, $response, $errHandler);

        // prepare authorizations
        $authorizationDisabled = new AuthorizationDisabled();

        // add your routes here
        $router->addRoute(new HTTPRouteExample($request, $response, $authorizationDisabled));

        // return
        return $router;
    }
public function buildRouter() : HTTPRouter
    {
        // create router dependencies and router instance
        $request = new HTTPInputRequestDefault();
        $response = new HTTPOutputResponseDefault($request);
        $errHandler = new HTTPErrorHandlerDefault();
        $router = new HTTPRouterDefault($request, $response, $errHandler);

        // prepare authorizations
        $authorizationDisabled = new AuthorizationDisabled();

        // add your routes here
        $router->addRoute(new HTTPRouteExample($request, $response, $authorizationDisabled));

        // return
        return $router;
    }
public function buildRouter ( ) : HTTPRouter { // create router dependencies and router instance $ request = new HTTPInputRequestDefault ( ) ; $ response = new HTTPOutputResponseDefault ( $ request ) ; $ errHandler = new HTTPErrorHandlerDefault ( ) ; $ router = new HTTPRouterDefault ( $ request , $ response , $ errHandler ) ; // prepare authorizations $ authorizationDisabled = new AuthorizationDisabled ( ) ; // add your routes here $ router -> addRoute ( new HTTPRouteExample ( $ request , $ response , $ authorizationDisabled ) ) ; // return return $ router ; }
Build and return Router.

@return HTTPRouter
Build and return Router .