src/Result.php
public static function createSuccess(
        string $routeName,
        array $routeParams = [],
        array $routeAllowedMethods = [],
        array $routeMiddlewares = [],
        array $routeHandler = []
    ):self {
        $result                         = new self();
        $result->routeName              = $routeName;
        $result->routeParams            = $routeParams;
        $result->routeAllowedMethods    = $routeAllowedMethods;
        $result->routeMiddlewares       = $routeMiddlewares;
        $result->routeHandler           = $routeHandler;
        $result->status                 = $result::ROUTE_FOUND;
        return $result;
    }
public static function createSuccess(
        string $routeName,
        array $routeParams = [],
        array $routeAllowedMethods = [],
        array $routeMiddlewares = [],
        array $routeHandler = []
    ):self {
        $result                         = new self();
        $result->routeName              = $routeName;
        $result->routeParams            = $routeParams;
        $result->routeAllowedMethods    = $routeAllowedMethods;
        $result->routeMiddlewares       = $routeMiddlewares;
        $result->routeHandler           = $routeHandler;
        $result->status                 = $result::ROUTE_FOUND;
        return $result;
    }
public static function createSuccess ( string $ routeName , array $ routeParams = [ ] , array $ routeAllowedMethods = [ ] , array $ routeMiddlewares = [ ] , array $ routeHandler = [ ] ) : self { $ result = new self ( ) ; $ result -> routeName = $ routeName ; $ result -> routeParams = $ routeParams ; $ result -> routeAllowedMethods = $ routeAllowedMethods ; $ result -> routeMiddlewares = $ routeMiddlewares ; $ result -> routeHandler = $ routeHandler ; $ result -> status = $ result :: ROUTE_FOUND ; return $ result ; }
Create an instance if matching was success

@param string $routeName
@param array $routeParams
@param array $routeAllowedMethods
@param array $routeMiddlewares
@param array $routeHandler
@return self
Create an instance if matching was success