October\Rain\Assetic\Filter\LessphpFilter

Implements:

  • October\Rain\Assetic\Filter\DependencyExtractorInterface
  • October\Rain\Assetic\Filter\FilterInterface

Loads LESS files using the PHP implementation of less, lessphp.

Less files are mostly compatible, but there are slight differences.

Protected properties

protected array $loadPaths

Lessphp Load Paths

Public methods

public void addLoadPath(string $path)

Adds a load path to the paths used by lessphp

Parameters
  • string $path - Load Path

public void filterDump($asset)
Parameters
  • $asset

public void filterLoad($asset)
Parameters
  • $asset

public void getChildren($factory, $content, $loadPath=NULL)
Parameters
  • $factory
  • $content
  • $loadPath

public void registerFunction($name, $callable)
Parameters
  • $name
  • $callable

public void setFormatter(string $formatter)
Parameters
  • string $formatter - One of "lessjs", "compressed", or "classic".

public void setLoadPaths(array $loadPaths)

Sets load paths used by lessphp

Parameters
  • array $loadPaths - Load paths

public void setOptions($options)
Parameters
  • $options

public void setPreserveComments(boolean $preserveComments)
Parameters
  • boolean $preserveComments

public void setPresets($presets)
Parameters
  • $presets