PHP code example of alexpts / symfony-asset-strategy-last-modify
1. Go to this page and download the library: Download alexpts/symfony-asset-strategy-last-modify library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
alexpts / symfony-asset-strategy-last-modify example snippets
$package = new Package(new LastModifyStrategy($assertDirPath));
$url = $package->getUrl('/jquery.js'); // /jquery.js?v=1472155706
$package = new Package(new LastModifyStrategy($assertDirPath, 'cdn.host.org'));
$url = $package->getUrl('/jquery.js'); // //cdn.host.org/jquery.js?v=1472155706