public function resolve($method = null, $route = null)
	{
		$serverRequest = new ServerRequest();

		if ($method === null) {
			$method = $serverRequest->getMethod();
		}

		if ($route === null) {
			$route = $serverRequest->getUri()->getPath();
		}

		if ($this->basePath !== '' && strpos($route, $this->basePath, 0) === 0) {
			$route = substr($route, strlen($this->basePath));
		}

		return $this->callCallable($this->getCallable($method, $route));
	}
public function resolve($method = null, $route = null)
	{
		$serverRequest = new ServerRequest();

		if ($method === null) {
			$method = $serverRequest->getMethod();
		}

		if ($route === null) {
			$route = $serverRequest->getUri()->getPath();
		}

		if ($this->basePath !== '' && strpos($route, $this->basePath, 0) === 0) {
			$route = substr($route, strlen($this->basePath));
		}

		return $this->callCallable($this->getCallable($method, $route));
	}
public function resolve ( $ method = null , $ route = null ) { $ serverRequest = new ServerRequest ( ) ; if ( $ method === null ) { $ method = $ serverRequest -> getMethod ( ) ; } if ( $ route === null ) { $ route = $ serverRequest -> getUri ( ) -> getPath ( ) ; } if ( $ this -> basePath !== '' && strpos ( $ route , $ this -> basePath , 0 ) === 0 ) { $ route = substr ( $ route , strlen ( $ this -> basePath ) ) ; } return $ this -> callCallable ( $ this -> getCallable ( $ method , $ route ) ) ; }
Returns the result of the given route's callable.

@param string|null $method = new ServerRequest()->getMethod()
@param string|null $route = new ServerRequest()->getUri()->getPath()
@return mixed the result of the given route's callable.
@throws ServerResponseException
Returns the result of the given route s callable .