$default_options
$default_options :
Default parser options
Class for parsing and compiling less files into css
$env : \Less_Environment
__construct(\Less_Environment|array|null $env = null)
\Less_Environment|array|null | $env |
parse(string $str, $file_uri = null) : \Less_Tree_Ruleset|\Less_Parser
Parse a Less string into css
string | $str | The string to convert |
$file_uri |
parseFile(string $filename, string $uri_root = '', boolean $returnRoot = false) : \Less_Tree_Ruleset|\Less_Parser
Parse a Less string from a given file
string | $filename | The file to parse |
string | $uri_root | The url of the file |
boolean | $returnRoot | Indicates whether the return value should be a css string a root node |
ModifyVars(array $vars) : \Less_Parser
Allows a user to set variables values
array | $vars |
SetImportDirs(array $dirs)
Set a list of directories or callbacks the parser should use for determining import paths
array | $dirs |
None found |
PeekReg(string $tok) : integer
Same as match(), but don't change the state of the parser, just return the match.
string | $tok |
None found |
None found |
parseMultiplication() : \Less_Tree_Operation|null
Parses multiplication operation
None found |
is_method( $a, string $b)
Some versions of php have trouble with method_exists($a,$b) if $a is not an object
$a | ||
string | $b |
None found |
round( $i, $precision)
Round numbers similarly to javascript eg: 1.499999 to 1 instead of 2
$i | ||
$precision |
None found |
NewObj0( $class) : mixed
Create Less_Tree_* objects and optionally generate a cache string
$class |
None found |
ArgString( $arg) : string
Convert an argument to a string for use in the parser cache
$arg |
None found |
None found |
GetRules(string|null $file_path)
Return the results of parsePrimary for $file_path Use cache and save cached results if possible
string|null | $file_path |
None found |
match(array $toks) : array
Parse from a token, regexp or string, and move forward if match
array | $toks |
None found |
MatchFuncs(array<mixed,string> $toks) : string
array<mixed,string> | $toks |
None found |
None found |
parseNameValue()
Custom less.php parse function for finding simple name-value css pairs ex: width:100px;
None found |
parseAddition() : \Less_Tree_Operation|null
Parses an addition operation
None found |
parseConditions() : \Less_Tree_Condition|null
Parses the conditions
None found |
parseOperand()
An operand is anything that can be part of an operation, such as a Color, or a Variable
None found |
parseExpression() : \Less_Tree_Expression|null
Expressions either represent mathematical operations, or white-space delimited Entities.
1px solid black
var |
2 |
---|
parseProperty() : string
Parse a property eg: 'min-width', 'orientation', etc
None found |