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 | |
lib_red ($color) | |
lib_green ($color) | |
lib_blue ($color) | |
__construct ($fname=null) | |
compile ($string, $name=null) | |
compileFile ($fname, $outFname=null) | |
checkedCompile ($in, $out) | |
cachedCompile ($in, $force=false) | |
parse ($str=null, $initialVariables=null) | |
setFormatter ($name) | |
setPreserveComments ($preserve) | |
registerFunction ($name, $func) | |
unregisterFunction ($name) | |
setVariables ($variables) | |
unsetVariable ($name) | |
setImportDir ($dirs) | |
addImportDir ($dir) | |
allParsedFiles () | |
Fonctions membres publiques statiques | |
static | compressList ($items, $delim) |
static | preg_quote ($what) |
static | ccompile ($in, $out, $less=null) |
static | cexecute ($in, $force=false, $less=null) |
Champs de données | |
$vPrefix = '@' | |
$mPrefix = '$' | |
$parentSelector = '&' | |
$importDisabled = false | |
$importDir = '' | |
Attributs publics statiques | |
static | $VERSION = "v0.3.9" |
static | $defaultValue = array("keyword", "") |
Attributs protégés | |
$libFunctions = array() | |
$registeredVars = array() | |
$preserveComments = false | |
$numberPrecision = null | |
$sourceParser = null | |
$sourceLoc = null | |
Attributs protégés statiques | |
static | $TRUE = array("keyword", "true") |
static | $FALSE = array("keyword", "false") |
static | $nextImportId = 0 |
static | $cssColors |
__construct | ( | $fname = null | ) |
Initialize any static state, can initialize parser for a file
type | $fname | X |
Références null.
addImportDir | ( | $dir | ) |
Add import dir
type | $dir | X |
|
protected |
allParsedFiles | ( | ) |
All parsed files
|
protected |
cachedCompile | ( | $in, | |
$force = false |
|||
) |
Execute lessphp on a .less file or a lessphp cache structure
The lessphp cache structure contains information about a specific less file having been parsed. It can be used as a hint for future calls to determine whether or not a rebuild is required.
The cache structure contains two important keys that may be used externally:
compiled: The final compiled CSS updated: The time (in seconds) the CSS was last compiled
The cache structure is a plain-ol' PHP associative array and can be serialized and unserialized without a hitch.
mixed | $in | Input |
bool | $force | Force rebuild? |
If we are forcing a recompile or if for some reason the structure does not contain any file information we should specify the root to trigger a rebuild.
One of the files we knew about previously has changed so we should look at our incoming root again.
TODO: Throw an exception? We got neither a string nor something that looks like a compatible lessphp cache structure.
|
static |
Compile file $in to file $out if $in is newer than $out Returns true when it compiles, false otherwise
type | $in | X |
type | $out | X |
self | $less | X |
Références null.
checkedCompile | ( | $in, | |
$out | |||
) |
Compile only if changed input has changed or output doesn't exist
type | $in | X |
type | $out | X |
|
protected |
Clamp
type | $v | X |
type | $max | X |
type | $min | X |
|
protected |
|
protected |
|
protected |
Helper function to get arguments for color manipulation functions. takes a list that contains a color like thing and a percentage
array | $args | Args |
Références $color.
compile | ( | $string, | |
$name = null |
|||
) |
|
protected |
Recursively compiles a block.
A block is analogous to a CSS block in most cases. A single LESS document is encapsulated in a block when parsed, but it does not have parent tags so all of it's children appear on the root level when compiled.
Blocks are made up of props and children.
Props are property instructions, array tuples which describe an action to be taken, eg. write a property, set a variable, mixin a block.
The children of a block are just all the blocks that are defined within. This is used to look up mixins when performing a mixin.
Compiling the block involves pushing a fresh environment on the stack, and iterating through the props, compiling each one.
stdClass | $block | Block |
|
protected |
compileFile | ( | $fname, | |
$outFname = null |
|||
) |
Compile file
type | $fname | X |
type | $outFname | X |
Exception |
FOF - BEGIN CHANGE *
FOF - END CHANGE *
Références FOFPlatform\getInstance(), et null.
|
protected |
Compile Imported Props
array | $props | Props |
stdClass | $block | Block |
string | $out | Out |
FOFLessParser | $sourceParser | Source parser |
string | $importDir | Import dir |
|
protected |
|
protected |
|
protected |
Compile nested block
stdClass | $block | Block |
array | $selectors | Selectors |
|
protected |
|
protected |
Compile props
type | $block | Something |
type | $out | Something |
|
protected |
|
protected |
Reduces selector expressions
array | $selectors | The selector expressions |
Références $value.
|
protected |
Compiles a primitive value into a CSS property value.
Values in lessphp are typed by being wrapped in arrays, their format is typically:
array(type, contents [, additional_contents]*)
The input is expected to be reduced. This function will not work on things like expressions and variables.
array | $value | Value |
Format:
[1] - red component (either number or a %) [2] - green component [3] - blue component [4] - optional alpha component
|
static |
Compresslist
array | $items | Items |
string | $delim | Delimiter |
Références $items.
Référencé par FOFLessParser\expressionList(), et FOFLessParser\propertyValue().
|
protected |
Equality check
mixed | $left | Left operand |
mixed | $right | Right operand |
|
protected |
Evaluate an expression
type | $exp | X |
|
protected |
|
protected |
Does file $name exists? It's a simple proxy to JFile for now
string | $name | The file we check for existence |
FOF - BEGIN CHANGE *
FOF - END CHANGE *
Références $name, et FOFPlatform\getInstance().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
lib_blue | ( | $color | ) |
|
protected |
|
protected |
Third party code; your guess is as good as mine
array | $arg | Arg |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
lib_green | ( | $color | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
mixes two colors by weight mix(, , ); http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html#mix-instance_method
array | $args | Args |
|
protected |
Third party code; your guess is as good as mine
array | $arg | Arg |
lib_red | ( | $color | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Lib unit
type | $arg | X |
|
protected |
|
protected |
Make parser
type | $name | X |
FOF – BEGIN CHANGE *
FOF – END CHANGE *
Références $name.
|
protected |
Media parent
stdClass | $scope | Scope |
|
protected |
Multiply media
type | $env | X |
type | $childQueries | X |
|
protected |
Multiply $selectors against the nearest selectors in env
array | $selectors | The selectors |
Références $count.
|
protected |
New formatter
FOF – BEGIN CHANGE *
FOF – END CHANGE *
FOF – BEGIN CHANGE *
FOF – END CHANGE *
Références $className.
|
protected |
|
protected |
Op color number
type | $op | X |
type | $lft | X |
int | $rgt | X |
|
protected |
Op number color
type | $op | X |
type | $lft | X |
type | $rgt | X |
|
protected |
|
protected |
Pattern match
type | $block | X |
type | $callingArgs | X |
Match the guards if it has them any one of the groups must have all its guards pass for a match
Références $i.
|
protected |
|
protected |
Pop something off the stack
|
static |
Quote for regular expression
string | $what | What to quote |
Référencé par FOFLessParser\__construct(), FOFLessParser\literal(), FOFLessParser\string(), et FOFLessParser\to().
|
protected |
The state of execution
type | $block | X |
|
protected |
registerFunction | ( | $name, | |
$func | |||
) |
|
protected |
setFormatter | ( | $name | ) |
setImportDir | ( | $dirs | ) |
Set import dir
type | $dirs | X |
setPreserveComments | ( | $preserve | ) |
Set preserve comments
type | $preserve | X |
setVariables | ( | $variables | ) |
Set variables
type | $variables | X |
|
protected |
|
protected |
String concatenate
type | $left | X |
string | $right | X |
|
protected |
Uses the current value of $this->count to show line and line number
type | $msg | X |
|
protected |
To bool
type | $a | X |
|
protected |
|
protected |
|
protected |
|
protected |
unregisterFunction | ( | $name | ) |
unsetVariable | ( | $name | ) |
|
protected |
|
staticprotected |
|
static |
|
staticprotected |
$importDir = '' |
$importDisabled = false |
|
protected |
$mPrefix = '$' |
|
staticprotected |
|
protected |
$parentSelector = '&' |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
static |
$vPrefix = '@' |