wikimedia/less.php
PHP port of the LESS processor
Loading...
Searching...
No Matches
Less_Cache Class Reference

Utility for handling the generation and caching of css files. More...

Static Public Member Functions

static Get ( $less_files, $parser_options=[], $modify_vars=[])
 Save and reuse the results of compiled less files.
 
static Regen ( $less_files, $parser_options=[], $modify_vars=[])
 Force the compiler to regenerate the cached css file.
 
static Cache (&$less_files, $parser_options=[])
 
static SetCacheDir ( $dir)
 
static CheckCacheDir ()
 
static CleanCache ()
 Delete unused less.php files.
 
static ListFiles ( $list_file, &$list, &$css_file_name)
 Get the list of less files and generated css file from a list file.
 

Static Public Attributes

static $cache_dir = false
 
static $prefix = 'lessphp_'
 
static $prefix_vars = 'lessphpvars_'
 
static $gc_lifetime = 604800
 

Detailed Description

Utility for handling the generation and caching of css files.

Member Function Documentation

◆ Get()

static Less_Cache::Get ( $less_files,
$parser_options = [],
$modify_vars = [] )
static

Save and reuse the results of compiled less files.

The first call to Get() will generate css and save it. Subsequent calls to Get() with the same arguments will return the same css filename

Parameters
array$less_filesArray of .less files to compile
array$parser_optionsArray of compiler options
array$modify_varsArray of variables
Returns
string|false Name of the css file

◆ Regen()

static Less_Cache::Regen ( $less_files,
$parser_options = [],
$modify_vars = [] )
static

Force the compiler to regenerate the cached css file.

Parameters
array$less_filesArray of .less files to compile
array$parser_optionsArray of compiler options
array$modify_varsArray of variables
Returns
string Name of the css file

The documentation for this class was generated from the following file: