UserFrosting API

RawAssetBundles extends GulpBundleAssetsRawBundles

RawAssetBundles Class.

Extends GulpBundleAssetsRawBundles with an extend method that merges the referenced asset bundles with special collision logic.

Tags
author

Alex Weissman (https://alexanderweissman.com)

Table of Contents

$cssBundles array
$jsBundles array
extend() Extends the currently loaded bundles with another bundle schema. mixed
addWithCollisionRule() Adds provided bundle to provided bundle store with collision rule respected. mixed
__construct() Constructor. mixed
standardiseBundle() Validates bundle data and returns standardised data. string[]
getCssBundleAssets() Gets assets in specified CSS bundle. string[]
getJsBundleAssets() Gets assets in specified JS bundle. string[]
readSchema() Attempts to read the schema file from provided path. mixed|Repository

Properties

Methods

addWithCollisionRule()

Adds provided bundle to provided bundle store with collision rule respected.

protected addWithCollisionRule( &$bundle : string|string[] , $bundleName : mixed , $collisionRule : string , &$bundleStore : mixed ) : mixed
Parameters
$bundle : string|string[]

Bundle to add.

$bundleName : mixed
$collisionRule : string

Rule to apply if collision is detected.

$bundleStore : mixed
Tags
throws
ErrorException

if collision rule is 'error' and bundle is already defined.

throws
OutOfBoundsException

if an invalid collision rule is provided.

Return values
mixed

__construct()

Constructor.

public __construct( $filePath : string ) : mixed
Parameters
$filePath : string

Path to gulp-bundle-assets file.

Return values
mixed

standardiseBundle()

Validates bundle data and returns standardised data.

protected standardiseBundle( $bundle : string|string[] ) : string[]
Parameters
$bundle : string|string[]
Return values
string[]

getCssBundleAssets()

Gets assets in specified CSS bundle.

public getCssBundleAssets( [ $bundleName : mixed = '' ] ) : string[]
Parameters
$bundleName : mixed = ''

Name of bundle.

Return values
string[]

getJsBundleAssets()

Gets assets in specified JS bundle.

public getJsBundleAssets( [ $bundleName : mixed = '' ] ) : string[]
Parameters
$bundleName : mixed = ''

Name of bundle.

Return values
string[]

readSchema()

Attempts to read the schema file from provided path.

protected readSchema( $path : string [, $useRepository : bool = false ] ) : mixed|Repository
Parameters
$path : string

Path to schema file.

$useRepository : bool = false

Deprecated, will be removed in a future release. Setting this to true is recommended for an easier migration.

Tags
throws
FileNotFoundException

if file cannot be found.

throws
JsonException

if file cannot be parsed as JSON.

Return values
mixed|Repository

Returns file contents parsed by json_decode or a Repository if $useRepository is true.

Search results