메소드 | 설명 | |
---|---|---|
__construct ( string | null $basePath = null ) | Constructor. Set the path prefix. | |
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface | Execute the middleware. | |
autodetect ( boolean $autodetect = true ) : self | Autodetect the basePath. | |
getBasePath ( Psr\Http\Message\ServerRequestInterface $request ) : string | null | Returns the basePath. | |
getGenerator ( Psr\Http\Message\ServerRequestInterface $request ) : callable | null | Returns a callable to build a full path. |
메소드 | 설명 | |
---|---|---|
detectBasePath ( Psr\Http\Message\ServerRequestInterface $request ) : string | Auto-detect the base path from the request environment. |
public __construct ( string | null $basePath = null ) | ||
$basePath | string | null |
public __invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface | ||
$request | Psr\Http\Message\ServerRequestInterface | |
$response | Psr\Http\Message\ResponseInterface | |
$next | callable | |
리턴 | Psr\Http\Message\ResponseInterface |
public autodetect ( boolean $autodetect = true ) : self | ||
$autodetect | boolean | |
리턴 | self |
public static getBasePath ( Psr\Http\Message\ServerRequestInterface $request ) : string | null | ||
$request | Psr\Http\Message\ServerRequestInterface | |
리턴 | string | null |
public static getGenerator ( Psr\Http\Message\ServerRequestInterface $request ) : callable | null | ||
$request | Psr\Http\Message\ServerRequestInterface | |
리턴 | callable | null |