PHP code example of sahtepetrucci / responsive-retina-css-sprites
1. Go to this page and download the library: Download sahtepetrucci/responsive-retina-css-sprites 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/ */
sahtepetrucci / responsive-retina-css-sprites example snippets
use Sahtepetrucci\SpritesGenerator\SpritesHandler;
$handler = new SpritesHandler();
$handler->generate($collection);
$collection = [
(object)[
'id' => 1,
'name' => 'Item',
'icon' => 'icons8-airport-100.png'
],
(object)[
'id' => 2,
'name' => 'Another Item',
'icon' => 'icons8-bus-100.png'
],
];
$handler->generate($collection);
$handler->createSampleHtml($collection); //optional