PHP code example of germania-kg / asset-timestamper
1. Go to this page and download the library: Download germania-kg/asset-timestamper 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/ */
germania-kg / asset-timestamper example snippets
use Germania\AssetTimestamper\AssetTimestamper;
// Instantiation
$at = new AssetTimestamper;
// Both are equal
echo $at( '/dist/styles.css' );
echo $at->__invoke( '/dist/styles.css' );
//even those, missing leading slash:
echo $at( 'dist/styles.css' );
echo $at->__invoke( 'dist/styles.css' );
// Outputs something like:
"/dist/styles/styles.20160522140459.css"