Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques | |
__construct ($lessc, $sourceName=null) | |
parse ($buffer) | |
propertyValue (&$value, $keyName=null) | |
throwError ($msg="parse error", $count=null) | |
Fonctions membres protégées | |
parseChunk () | |
isDirective ($dirname, $directives) | |
fixTags ($tags) | |
expressionList (&$exps) | |
expression (&$out) | |
expHelper ($lhs, $minP) | |
parenValue (&$out) | |
value (&$value) | |
import (&$out) | |
mediaQueryList (&$out) | |
mediaQuery (&$out) | |
mediaExpression (&$out) | |
openString ($end, &$out, $nestingOpen=null, $rejectStrs=null) | |
string (&$out) | |
interpolation (&$out) | |
unit (&$unit) | |
color (&$out) | |
argumentValues (&$args, $delim=',') | |
argumentDef (&$args, &$isVararg, $delim=',') | |
tags (&$tags, $simple=false, $delim=',') | |
mixinTags (&$tags) | |
tagBracket (&$value) | |
tagExpression (&$value) | |
tag (&$tag, $simple=false) | |
func (&$func) | |
variable (&$name) | |
assign ($name=null) | |
keyword (&$word) | |
end () | |
guards (&$guards) | |
guardGroup (&$guardGroup) | |
guard (&$guard) | |
literal ($what, $eatWhitespace=null) | |
genericList (&$out, $parseItem, $delim="", $flatten=true) | |
to ($what, &$out, $until=false, $allowNewline=false) | |
match ($regex, &$out, $eatWhitespace=null) | |
whitespace () | |
peek ($regex, &$out=null, $from=null) | |
seek ($where=null) | |
pushBlock ($selectors=null, $type=null) | |
pushSpecialBlock ($type) | |
append ($prop, $pos=null) | |
pop () | |
removeComments ($text) | |
Attributs protégés | |
$blockDirectives = array("font-face", "keyframes", "page", "-moz-document") | |
$lineDirectives = array("charset") | |
$inParens = false | |
Attributs protégés statiques | |
static | $nextBlockId = 0 |
static | $precedence |
static | $whitePattern |
static | $commentMulti |
static | $commentSingle = "//" |
static | $commentMultiLeft = "/*" |
static | $commentMultiRight = "*/" |
static | $operatorString |
static | $supressDivisionProps = array('/border-radius$/i', '/^font$/i') |
static | $literalCache = array() |
This class is taken verbatim from:
lessphp v0.3.9 http://leafo.net/lessphp
LESS css compiler, adapted from http://lesscss.org
Copyright 2012, Leaf Corcoran leafo Licensed under MIT or GPLv3, see LICENSE t@gm ail.c om
Responsible for taking a string of LESS code and converting it into a syntax tree
__construct | ( | $lessc, | |
$sourceName = null |
|||
) |
Constructor
[type] | $lessc [description] | |
string | $sourceName | [description] |
Références FOFLess\preg_quote().
|
protected |
Append a property to the current block
[type] | $prop [description] |
[type] | $pos [description] |
Références null.
|
protected |
Consume an argument definition list surrounded by () each argument is a variable name with optional value or at the end a ... or a variable named followed by ...
[type] | &$args [description] |
[type] | &$isVararg [description] |
[type] | $delim [description] |
|
protected |
|
protected |
Consume an assignment operator Can optionally take a name that will be set to the current property name
string | $name | [description] |
Références $name.
|
protected |
a # color
[type] | &$out [description] |
|
protected |
|
protected |
Recursively parse infix equation with $lhs at precedence $minP
type | $lhs | [description] |
type | $minP | [description] |
Références value.
|
protected |
|
protected |
a list of expressions
[type] | &$exps [description] |
Références FOFLess\compressList().
|
protected |
[fixTags description]
[type] | $tags [description] |
|
protected |
|
protected |
|
protected |
[guard description]
[type] | &$guard [description] |
|
protected |
A bunch of guards that are and'd together
[type] | &$guardGroup [description] |
Références null.
|
protected |
|
protected |
|
protected |
|
protected |
[isDirective description]
string | $dirname | [description] |
[type] | $directives [description] |
|
protected |
Consume a keyword
[type] | &$word [description] |
|
protected |
[literal description]
[type] | $what [description] |
[type] | $eatWhitespace [description] |
Références null, et FOFLess\preg_quote().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
List of tags of specifying mixin path Optionally separated by > (lazy, accepts extra >)
[type] | &$tags [description] |
|
protected |
[parenValue description]
[type] | &$out [description] |
parse | ( | $buffer | ) |
|
protected |
Parse a single chunk off the head of the buffer and append it to the current parse environment. Returns false when the buffer is empty, or when there is an error.
This function is called repeatedly until the entire document is parsed.
This parser is most similar to a recursive descent parser. Single functions represent discrete grammatical rules for the language, and they are able to capture the text that represents those rules.
Consider the function lessc::keyword(). (all parse functions are structured the same)
The function takes a single reference argument. When calling the function it will attempt to match a keyword on the head of the buffer. If it is successful, it will place the keyword in the referenced argument, advance the position in the buffer, and return true. If it fails then it won't advance the buffer and it will return false.
All of these parse functions are powered by lessc::match(), which behaves the same way, but takes a literal regular expression. Sometimes it is more convenient to use match instead of creating a new function.
Because of the format of the functions, to parse an entire string of grammatical rules, you can chain them together using &&.
But, if some of the rules in the chain succeed before one fails, then the buffer position will be left at an invalid state. In order to avoid this, lessc::seek() is used to remember and set buffer positions.
Before parsing a chain, use $s = $this->seek() to remember the current position into $s. Then if a chain fails, use $this->seek($s) to go back where we started.
|
protected |
Pop something off the stack
propertyValue | ( | & | $value, |
$keyName = null |
|||
) |
Consume a list of values for a property
[type] | &$value [description] |
[type] | $keyName [description] |
Références $value, FOFLess\compressList(), et null.
|
protected |
|
protected |
|
protected |
|
protected |
[string description]
[type] | &$out [description] |
Références $content, elseif, et FOFLess\preg_quote().
|
protected |
A single tag
[type] | &$tag [description] | |
boolean | $simple | [description] |
Références $parts.
|
protected |
A bracketed value (contained within in a tag definition)
[type] | &$value [description] |
Références $value.
|
protected |
[tagExpression description]
[type] | &$value [description] |
Références $value.
|
protected |
Consume a list of tags This accepts a hanging delimiter
[type] | &$tags [description] |
[type] | $simple [description] |
[type] | $delim [description] |
throwError | ( | $msg = "parse error" , |
|
$count = null |
|||
) |
[throwError description]
string | $msg | [description] |
[type] | $count [description] |
Références $count.
Advance counter to next occurrence of $what $until - don't include $what in advance $allowNewline, if string, will be used as valid char set
[type] | $what [description] | |
[type] | &$out [description] | |
boolean | $until | [description] |
boolean | $allowNewline | [description] |
Références FOFLess\preg_quote().
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
if we are in parens we can be more liberal with whitespace around operators because it must evaluate to a single value and thus is less ambiguous.
Consider: property1: 10 -5; // is two numbers, 10 and -5 property2: (10 -5); // should evaluate to 5
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |