abstract class LessEngine in Less CSS Preprocessor 8
Same name and namespace in other branches
- 7.4 engines/abstract.LessEngine.inc \LessEngine
Class \LessEngine
Hierarchy
- class \LessEngine implements LessEngineInterface
Expanded class hierarchy of LessEngine
File
- engines/
abstract.LessEngine.inc, line 6
View source
abstract class LessEngine implements LessEngineInterface {
/**
* Path to the input .less file.
*
* @var string
*/
protected $input_file_path;
/**
* This will get populated with a list of files that $input_file_path depended
* on through @import statements.
*
* @var string[]
*/
protected $dependencies = array();
/**
* This contains any variables that are to be modified into the output.
*
* Key => value pairs, where the key is the LESS variable name.
*
* @var string[]
*/
protected $variables = array();
/**
* List of directories that are to be used for @import lookups.
*
* @var string[]
*/
protected $import_directories = array();
/**
* Flag if source maps are enabled.
*
* @var bool
*/
protected $source_maps_enabled = FALSE;
/**
* @var string|NULL
*/
protected $source_maps_base_path = NULL;
/**
* @var string|NULL
*/
protected $source_maps_root_path = NULL;
/**
* Basic constructor.
*
* Sets input_file_path property.
*
* @param string $input_file_path
*/
public function __construct($input_file_path) {
$this->input_file_path = $input_file_path;
}
/**
* {@inheritdoc}
*/
public function setImportDirectories(array $directories) {
$this->import_directories = $directories;
}
/**
* {@inheritdoc}
*/
public function setSourceMaps($enabled = FALSE, $base_path = NULL, $root_path = NULL) {
$this->source_maps_enabled = $enabled;
$this->source_maps_base_path = $base_path;
$this->source_maps_root_path = $root_path;
}
/**
* {@inheritdoc}
*/
public function modifyVariables(array $variables) {
$this->variables = $variables;
}
/**
* {@inheritdoc}
*/
public function getDependencies() {
return $this->dependencies;
}
/**
* {@inheritdoc}
*/
public abstract function compile();
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LessEngine:: |
protected | property | This will get populated with a list of files that $input_file_path depended on through @import statements. | |
LessEngine:: |
protected | property | List of directories that are to be used for @import lookups. | |
LessEngine:: |
protected | property | Path to the input .less file. | |
LessEngine:: |
protected | property | ||
LessEngine:: |
protected | property | Flag if source maps are enabled. | |
LessEngine:: |
protected | property | ||
LessEngine:: |
protected | property | This contains any variables that are to be modified into the output. | |
LessEngine:: |
abstract public | function |
This returns the compiled output from the LESS engine. Overrides LessEngineInterface:: |
3 |
LessEngine:: |
public | function |
Returns list of dependencies. Overrides LessEngineInterface:: |
1 |
LessEngine:: |
public | function |
Set/override variables. Overrides LessEngineInterface:: |
|
LessEngine:: |
public | function |
Set list of lookup directories for @import statements. Overrides LessEngineInterface:: |
|
LessEngine:: |
public | function |
Enable Overrides LessEngineInterface:: |
|
LessEngine:: |
public | function | Basic constructor. | 3 |