PHP code example of jameslevi / sprite
1. Go to this page and download the library: Download jameslevi/sprite 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/ */
jameslevi / sprite example snippets
/**
* Method to generate sprite image and stylesheet.
*
* @param array $arguments
* @return void
*/
protected function generate(array $arguments)
{
}
// Create new instance by setting sprite name and asset location.
$sprite = new Sprite("test", __DIR__ . "/../resources/icons");
// Set where to save the generated sprite image.
$sprite->setGeneratedImagePath(__DIR__ . "/../public/img");
$sprite->setImageBaseURL("/../img");
// Set where to save the generated css file.
$sprite->setGeneratedCSSPath(__DIR__ . "/../public/css");
$sprite->generate();
php atmos --make sprite
php atmos sprite:generate