Aerys\Request::getUri PHP Method

getUri() public method

Retrieve the request URI in the form /some/resource/foo?bar=1&baz=2
public getUri ( ) : string
return string
    public function getUri() : string;

Usage Example

Example #1
0
 /**
  * Respond to HTTP requests for filesystem resources
  */
 public function __invoke(Request $request, Response $response)
 {
     $uri = $request->getLocalVar("aerys.sendfile") ?: $request->getUri();
     $path = ($qPos = \strpos($uri, "?")) ? \substr($uri, 0, $qPos) : $uri;
     // IMPORTANT! Do NOT remove this. If this is left in, we'll be able to use /path\..\../outsideDocRoot defeating the removeDotPathSegments() function! (on Windows at least)
     $path = \str_replace("\\", "/", $path);
     $path = self::removeDotPathSegments($path);
     // We specifically break the lookup generator out into its own method
     // so that we can potentially avoid forcing the server to resolve a
     // coroutine when the file is already cached.
     return ($fileInfo = $this->fetchCachedStat($path, $request)) ? $this->respond($fileInfo, $request, $response) : $this->respondWithLookup($this->root . $path, $path, $request, $response);
 }
All Usage Examples Of Aerys\Request::getUri