class Javascript implements PresetAdapterInterface

Properties

static array $defaults

Methods

__construct(array $data, AssetsPresetInterface $preset)

No description

array
getData()

Return the parsed and transformed statement array

void
parse()

Parse and transform the preset statement to a ready-to-use information

string
__toString()

Returns the src path of the preset statement

string
__toHtml()

Returns the full HTML script

Details

at line 66
__construct(array $data, AssetsPresetInterface $preset)

Parameters

array $data The preset data
AssetsPresetInterface $preset

at line 79
array getData()

Return the parsed and transformed statement array

Return Value

array

Exceptions

Exception : any caught exception thrown by self::parse()

See also

self::parse()

at line 107
void parse()

Parse and transform the preset statement to a ready-to-use information

The statement string can be constructed as (without spaces):

position : info : src

where position can be an integer or a string like top or bottom, info can be a string like pack for packed javascript or min for already minified scripts and src is the relative path of the file in the original package. Position is a [-1;100] integer range where 100 is the top of the stack (first files to include).

By default, position is 0 (the file is added to the stack), and the script is considered not minified neither as packed.

Return Value

void

Exceptions

Exception if one of the statements is malformed

at line 173
string __toString()

Returns the src path of the preset statement

Return Value

string

at line 189
string __toHtml()

Returns the full HTML script

Return Value

string