PHP Class ComponentInstaller\Process\RequireJsProcess

Inheritance: extends Process
Afficher le fichier Open project: robloach/component-installer Class Usage Examples

Protected Properties

Свойство Type Description
$baseUrl The base URL for the require.js configuration.

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

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

arrayMergeRecursiveDistinct() protected méthode

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
Résultat array

init() public méthode

public init ( )

newAssetCollection() protected méthode

protected newAssetCollection ( ) : Assetic\Asset\AssetCollection
Résultat Assetic\Asset\AssetCollection

process() public méthode

public process ( )

requireJs() public méthode

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

requireJson() public méthode

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.
Résultat array The built JSON array.

Property Details

$baseUrl protected_oe property

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