protected function compile(array $input, $cache, array $options = [], array $modifyVars = [])
    {
        $parse = $this->prepareInputFilesForParsing($input);

        if ($cache) {
            $options += ['cache_dir' => $this->cssPath];
            return \Less_Cache::Get($parse, $options, $modifyVars);
        }

        $lessc = new \Less_Parser($options);

        foreach ($parse as $file => $path) {
            $lessc->parseFile($file, $path);
        }
        // ModifyVars must be called at the bottom of the parsing,
        // this way we're ensuring they override their default values.
        // http://lesscss.org/usage/#command-line-usage-modify-variable
        $lessc->ModifyVars($modifyVars);

        return $lessc->getCss();
    }
protected function compile(array $input, $cache, array $options = [], array $modifyVars = [])
    {
        $parse = $this->prepareInputFilesForParsing($input);

        if ($cache) {
            $options += ['cache_dir' => $this->cssPath];
            return \Less_Cache::Get($parse, $options, $modifyVars);
        }

        $lessc = new \Less_Parser($options);

        foreach ($parse as $file => $path) {
            $lessc->parseFile($file, $path);
        }
        // ModifyVars must be called at the bottom of the parsing,
        // this way we're ensuring they override their default values.
        // http://lesscss.org/usage/#command-line-usage-modify-variable
        $lessc->ModifyVars($modifyVars);

        return $lessc->getCss();
    }
protected function compile ( array $ input , $ cache , array $ options = [ ] , array $ modifyVars = [ ] ) { $ parse = $ this -> prepareInputFilesForParsing ( $ input ) ; if ( $ cache ) { $ options += [ 'cache_dir' => $ this -> cssPath ] ; return \ Less_Cache :: Get ( $ parse , $ options , $ modifyVars ) ; } $ lessc = new \ Less_Parser ( $ options ) ; foreach ( $ parse as $ file => $ path ) { $ lessc -> parseFile ( $ file , $ path ) ; } // ModifyVars must be called at the bottom of the parsing, // this way we're ensuring they override their default values. // http://lesscss.org/usage/#command-line-usage-modify-variable $ lessc -> ModifyVars ( $ modifyVars ) ; return $ lessc -> getCss ( ) ; }
Compiles an input less file to an output css file using the PHP compiler.

@param  array   $input       The input .less files to be compiled.
@param  array   $options     Options to be passed to the php parser.
@param  array   $modifyVars  Less modifyVars.
@param  bool    $cache       Whether to cache or not.
@return string               If cache is not enabled will return the full
CSS compiled. Otherwise it will return the
resulting filename from the compilation.
Compiles an input less file to an output css file using the PHP compiler .