alexpts/symfony-asset-strategy-last-modify

Strategy for symfony asset component

2.0.1 2018-01-30 11:25 UTC

This package is auto-updated.

Last update: 2024-10-15 02:35:55 UTC


README

Strategy for symfony assets component

SensioLabsInsight

Build Status Test Coverage Code Climate Scrutinizer Code Quality

Strategy for symfony assets component for get version from last modify file time.

Installation

$ composer require alexpts/symfony-asset-strategy-last-modify

Demo

$package = new Package(new LastModifyStrategy($assertDirPath));
$url = $package->getUrl('/jquery.js'); // /jquery.js?v=1472155706

With CDN

$package = new Package(new LastModifyStrategy($assertDirPath, 'cdn.host.org'));
$url = $package->getUrl('/jquery.js'); // //cdn.host.org/jquery.js?v=1472155706