EntrypointLookup
in package
implements
EntrypointLookupInterface, IntegrityDataProviderInterface
Returns the CSS or JavaScript files needed for a Webpack entry.
This reads a JSON file with the format of Webpack Encore's entrypoints.json file.
Tags
Table of Contents
Interfaces
- EntrypointLookupInterface
- Provides a way to reset an object to its initial state.
- IntegrityDataProviderInterface
Properties
- $cache : mixed
- $cacheKey : mixed
- $entriesData : mixed
- $entrypointJsonPath : mixed
- $returnedFiles : mixed
- $strictMode : mixed
Methods
- __construct() : mixed
- entryExists() : bool
- getCssFiles() : array<string|int, mixed>
- getIntegrityData() : array<string|int, string>
- Returns a map of integrity hashes indexed by asset paths.
- getJavaScriptFiles() : array<string|int, mixed>
- reset() : mixed
- Resets the state of this service.
- getEntriesData() : array<string|int, mixed>
- getEntryFiles() : array<string|int, mixed>
- validateEntryName() : mixed
Properties
$cache
private
mixed
$cache
$cacheKey
private
mixed
$cacheKey
$entriesData
private
mixed
$entriesData
$entrypointJsonPath
private
mixed
$entrypointJsonPath
$returnedFiles
private
mixed
$returnedFiles
= []
$strictMode
private
mixed
$strictMode
Methods
__construct()
public
__construct(string $entrypointJsonPath[, CacheItemPoolInterface $cache = null ][, string $cacheKey = null ][, bool $strictMode = true ]) : mixed
Parameters
- $entrypointJsonPath : string
- $cache : CacheItemPoolInterface = null
- $cacheKey : string = null
- $strictMode : bool = true
entryExists()
public
entryExists(string $entryName) : bool
Parameters
- $entryName : string
Return values
boolgetCssFiles()
public
getCssFiles(string $entryName) : array<string|int, mixed>
Parameters
- $entryName : string
Return values
array<string|int, mixed>getIntegrityData()
Returns a map of integrity hashes indexed by asset paths.
public
getIntegrityData() : array<string|int, string>
If multiples hashes are defined for a given asset they must be separated by a space.
For instance: [ 'path/to/file1.js' => 'sha384-Q86c+opr0lBUPWN28BLJFqmLhho+9ZcJpXHorQvX6mYDWJ24RQcdDarXFQYN8HLc', 'path/to/styles.css' => 'sha384-ymG7OyjISWrOpH9jsGvajKMDEOP/mKJq8bHC0XdjQA6P8sg2nu+2RLQxcNNwE/3J', ]
Return values
array<string|int, string>getJavaScriptFiles()
public
getJavaScriptFiles(string $entryName) : array<string|int, mixed>
Parameters
- $entryName : string
Return values
array<string|int, mixed>reset()
Resets the state of this service.
public
reset() : mixed
getEntriesData()
private
getEntriesData() : array<string|int, mixed>
Return values
array<string|int, mixed>getEntryFiles()
private
getEntryFiles(string $entryName, string $key) : array<string|int, mixed>
Parameters
- $entryName : string
- $key : string
Return values
array<string|int, mixed>validateEntryName()
private
validateEntryName(string $entryName) : mixed
Parameters
- $entryName : string