PHP Class ComponentInstaller\Process\RequireJsProcess

Inheritance: extends Process
Show file Open project: robloach/component-installer Class Usage Examples

Protected Properties

Property Type Description
$baseUrl The base URL for the require.js configuration.

Public Methods

Method Description
aggregateScripts ( array $package, array $scripts, string $file ) : boolean Concatenate all scripts together into one destination file.
init ( )
process ( )
requireJs ( array $json = [] ) : string Constructs the require.js file from the provided require.js JSON array.
requireJson ( array $packages ) : array Creates a require.js configuration from an array of packages.

Protected Methods

Method Description
arrayMergeRecursiveDistinct ( array &$array1, array &$array2 ) : array Merges two arrays without changing string array keys. Appends to array if keys are numeric.
newAssetCollection ( ) : Assetic\Asset\AssetCollection

Method Details

aggregateScripts() public method

Concatenate all scripts together into one destination file.
public aggregateScripts ( array $package, array $scripts, string $file ) : boolean
$package array
$scripts array
$file string
return boolean

arrayMergeRecursiveDistinct() protected method

Merges two arrays without changing string array keys. Appends to array if keys are numeric.
See also: array_merge()
See also: array_merge_recursive()
protected arrayMergeRecursiveDistinct ( array &$array1, array &$array2 ) : array
$array1 array
$array2 array
return array

init() public method

public init ( )

newAssetCollection() protected method

protected newAssetCollection ( ) : Assetic\Asset\AssetCollection
return Assetic\Asset\AssetCollection

process() public method

public process ( )

requireJs() public method

Constructs the require.js file from the provided require.js JSON array.
public requireJs ( array $json = [] ) : string
$json array The require.js JSON configuration.
return string The RequireJS JavaScript configuration.

requireJson() public method

Creates a require.js configuration from an array of packages.
public requireJson ( array $packages ) : array
$packages array An array of packages from the composer.lock file.
return array The built JSON array.

Property Details

$baseUrl protected property

The base URL for the require.js configuration.
protected $baseUrl