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.
stringThe amount of time to cache the asset.
Constructor.
Builds asset file path based off url
Sends an asset file to the client
Check the not modified header.
Serve assets if the path matches one.
__construct(array<string, mixed> $options = [])
Constructor.
array<string, mixed> $options optional The options to use
_getAssetFile(string $url): string|null
Builds asset file path based off url
string $url Asset URL
string|nulldeliverAsset(Psr\Http\Message\ServerRequestInterface $request, SplFileInfo $file): Cake\Http\Response
Sends an asset file to the client
Psr\Http\Message\ServerRequestInterface $request The request object to use.
SplFileInfo $file The file wrapper for the file.
Cake\Http\ResponseisNotModified(Psr\Http\Message\ServerRequestInterface $request, SplFileInfo $file): bool
Check the not modified header.
Psr\Http\Message\ServerRequestInterface $request The request to check.
SplFileInfo $file The file object to compare.
boolprocess(ServerRequestInterface $request, RequestHandlerInterface $handler): Psr\Http\Message\ResponseInterface
Serve assets if the path matches one.
Processes an incoming server request in order to produce a response. If unable to produce the response itself, it may delegate to the provided request handler to do so.
ServerRequestInterface $request The request.
RequestHandlerInterface $handler The request handler.
Psr\Http\Message\ResponseInterfaceThe amount of time to cache the asset.
string
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.Routing.Middleware.AssetMiddleware.html