class JavaScript

Properties

protected CallbackGenerator $callbackGenerator
protected array $config
protected ConfigOptimizer $configOptimizer
protected Configurator $configurator
Encoder $encoder
array $exports
FunctionCache $functionCache
protected HintGenerator $hintGenerator
protected Minifier $minifier
XSLT $rendererGenerator
protected StylesheetCompressor $stylesheetCompressor
protected string $xsl

Methods

__construct(Configurator $configurator)

Constructor

getMinifier()

Return the cached instance of Minifier (creates one if necessary)

string
getParser(array|null $config = null)

Get a JavaScript parser

setMinifier(string|Minifier $minifier)

Set the cached instance of Minifier

string
encode(mixed $value)

Encode a PHP value into an equivalent JavaScript representation

string
getExports()

Generate and return the public API

string
getFunctionCache()

No description

string
getHints()

Generate a HINT object that contains informations about the configuration

getPluginsConfig()

Return the plugins' config

getRegisteredVarsConfig()

Return the registeredVars config

array
getRootContext()

Return the root context config

string
getSource()

Return the parser's source

string
getStylesheet()

Return the JavaScript representation of the stylesheet

getTagsConfig()

Return the tags' config

string
injectConfig(string $src)

Inject the parser config into given source

Details

at line 104
__construct(Configurator $configurator)

Constructor

Parameters

Configurator $configurator Configurator

at line 123
Minifier getMinifier()

Return the cached instance of Minifier (creates one if necessary)

Return Value

Minifier

at line 139
string getParser(array|null $config = null)

Get a JavaScript parser

Parameters

array|null $config

Config array returned by the configurator

Return Value

string

JavaScript parser

at line 174
Minifier setMinifier(string|Minifier $minifier)

Set the cached instance of Minifier

Extra arguments will be passed to the minifier's constructor

Parameters

string|Minifier $minifier

Name of a supported minifier, or an instance of Minifier

Return Value

Minifier

The new minifier

at line 208
protected string encode(mixed $value)

Encode a PHP value into an equivalent JavaScript representation

Parameters

mixed $value

Original value

Return Value

string

JavaScript representation

at line 218
protected string getExports()

Generate and return the public API

Return Value

string

JavaScript Code

at line 238
protected string getFunctionCache()

No description

Return Value

string

Function cache serialized as a JavaScript object

at line 250
protected string getHints()

Generate a HINT object that contains informations about the configuration

Return Value

string

JavaScript Code

at line 264
protected Dictionary getPluginsConfig()

Return the plugins' config

Return Value

Dictionary

at line 349
protected Dictionary getRegisteredVarsConfig()

Return the registeredVars config

Return Value

Dictionary

at line 365
protected array getRootContext()

Return the root context config

Return Value

array

at line 375
protected string getSource()

Return the parser's source

Return Value

string

at line 409
protected string getStylesheet()

Return the JavaScript representation of the stylesheet

Return Value

string

at line 419
protected Dictionary getTagsConfig()

Return the tags' config

Return Value

Dictionary

at line 443
protected string injectConfig(string $src)

Inject the parser config into given source

Parameters

string $src

Parser's source

Return Value

string

Modified source