$cacheTime
$cacheTime : string
The amount of time to cache the asset.
Handles serving plugin assets in development mode.
This should not be used in production environments as it has sub-optimal performance when compared to serving files with a real webserver.
__invoke(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, callable $next) : \Psr\Http\Message\ResponseInterface
Serve assets if the path matches one.
\Psr\Http\Message\ServerRequestInterface | $request | The request. |
\Psr\Http\Message\ResponseInterface | $response | The response. |
callable | $next | Callback to invoke the next middleware. |
A response
isNotModified(\Psr\Http\Message\ServerRequestInterface $request, \Cake\Filesystem\File $file) : boolean
Check the not modified header.
\Psr\Http\Message\ServerRequestInterface | $request | The request to check. |
\Cake\Filesystem\File | $file | The file object to compare. |
deliverAsset(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, \Cake\Filesystem\File $file) : \Psr\Http\Message\ResponseInterface
Sends an asset file to the client
\Psr\Http\Message\ServerRequestInterface | $request | The request object to use. |
\Psr\Http\Message\ResponseInterface | $response | The response object to use. |
\Cake\Filesystem\File | $file | The file wrapper for the file. |
The response with the file & headers.
getType(\Cake\Filesystem\File $file) : string
Return the type from a File object
\Cake\Filesystem\File | $file | The file from which you get the type |
Loading…