Assetic\Filter\LessFilter::__construct PHP Method

__construct() public method

Constructor.
public __construct ( string $nodeBin = '/usr/bin/node', array $nodePaths = [] )
$nodeBin string The path to the node binary
$nodePaths array An array of node paths
    public function __construct($nodeBin = '/usr/bin/node', array $nodePaths = array())
    {
        $this->nodeBin = $nodeBin;
        $this->nodePaths = $nodePaths;
    }

Usage Example

 /**
  * Create a new NodeLessFilter instance.
  *
  * @param AssetParser $parser
  */
 public function __construct(AssetParser $parser)
 {
     $this->parser = $parser;
     parent::__construct('/usr/local/bin/node', ['/usr/local/lib/node_modules', '/usr/local/lib/node_modules/less/bin/lessc']);
 }