Download the PHP package odan/plates-asset-cache without Composer
On this page you can find all versions of the php package odan/plates-asset-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download odan/plates-asset-cache
More information about odan/plates-asset-cache
Files in odan/plates-asset-cache
Download odan/plates-asset-cache
More information about odan/plates-asset-cache
Files in odan/plates-asset-cache
Vendor odan
Package plates-asset-cache
Short Description Caching and compression for Plates template assets (JavaScript and CSS).
License MIT
Homepage https://github.com/odan/plates-asset-cache
Package plates-asset-cache
Short Description Caching and compression for Plates template assets (JavaScript and CSS).
License MIT
Homepage https://github.com/odan/plates-asset-cache
Please rate this library. Is it a good library?
Informations about the package plates-asset-cache
Plates Assets Cache Extension
Caching and compression for Plates template assets (JavaScript and CSS).
Installation
Requirements
- PHP 7.3+ or 8.0+
Configuration
Usage
The page template
Template file: index.php
Render a template
The result
Parameters
- Parameter: $assets
Name | Type | Default | Required | Description |
---|---|---|---|---|
files | array | [] | yes | All assets (files) to be delivered to the browser. Plates Folders (myalias::myfile.js ) are also supported. |
- Parameter: $options
Name | Type | Default | Required | Description |
---|---|---|---|---|
inline | bool | false | no | Defines whether the browser downloads the assets inline or via URL. |
minify | bool | true | no | Specifies whether JS/CSS compression is enabled or disabled. |
name | string | file | no | Defines the output file name within the URL. |
Slim 4 integration
For this example we use the PHP-DI package.
Add the container definition:
Render the template and write content to the response stream:
License
The MIT License (MIT). Please see License File for more information.
All versions of plates-asset-cache with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.3 || ^8.0
symfony/cache Version ^5
tubalmartin/cssmin Version ^4
mrclay/jsmin-php Version ^2
symfony/cache Version ^5
tubalmartin/cssmin Version ^4
mrclay/jsmin-php Version ^2
The package odan/plates-asset-cache contains the following files
Loading the files please wait ....