1. Go to this page and download the library: Download rezozero/slir 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/ */
rezozero / slir example snippets
namespace MyBundle\Utils;
/**
* SLIR Config Class
*
* @since 2.0
* @author Joe Lencioni <[email protected]>
* @package SLIR
*/
class SLIRConfig extends \SLIR\SLIRConfigDefaults
{
public static function init()
{
static::$garbageCollectDivisor = 400;
static::$garbageCollectFileCacheMaxLifetime = 345600;
static::$browserCacheTTL = 604800; // 7*24*60*60
static::$pathToCacheDir = YOUR_PROJECT_ROOT.'/cache';
static::$pathToErrorLog = YOUR_PROJECT_ROOT.'/files/slir-error-log';
static::$documentRoot = YOUR_PROJECT_ROOT.'/files';
static::$urlToSLIR = '/assets'; // Tell SLIR to listen after "/assets" route
static::$maxMemoryToAllocate = 64;
// This must be the last line of this function
parent::init();
}
}
SLIRConfig::init();