function lessc::__construct in Less CSS Preprocessor 6.3
Same name and namespace in other branches
- 6 lessc.inc.php \lessc::__construct()
File
- lessphp/
lessc.inc.php, line 1247
Class
Code
function __construct($fname = null) {
if (!self::$operatorString) {
self::$operatorString = '(' . implode('|', array_map(array(
$this,
'preg_quote',
), array_keys(self::$precedence))) . ')';
}
if ($fname) {
if (!is_file($fname)) {
throw new Exception('load error: failed to find ' . $fname);
}
$pi = pathinfo($fname);
$this->fileName = $fname;
$this->importDir = $pi['dirname'] . '/';
$this->buffer = file_get_contents($fname);
}
}