External files service.
More...
|
| | __construct (protected Config $config, protected Urls $urls, protected ViewsService $views, protected SimpleCache $simpleCache, protected ServerCache $serverCache) |
| | Constructor. More...
|
| |
| | register (string $type, string $name, string $url, string $location) |
| | Core registration function for external files. More...
|
| |
| | unregister (string $type, string $name) |
| | Unregister an external file. More...
|
| |
| | load (string $type, string $name) |
| | Load an external resource for use on this page. More...
|
| |
| | getLoadedResources (string $type, string $location) |
| | Get external resource descriptors. More...
|
| |
| | reset () |
| | Unregister all files. More...
|
| |
| | getSubResourceIntegrity (string $type, string $resource) |
| | Returns the integrity related to the resource file. More...
|
| |
External files service.
Definition at line 17 of file ExternalFiles.php.
◆ __construct()
Constructor.
- Parameters
-
| Config | $config | config |
| Urls | $urls | urls service |
| ViewsService | $views | views service |
| SimpleCache | $simpleCache | simplecache |
| ServerCache | $serverCache | server cache |
Definition at line 37 of file ExternalFiles.php.
◆ getLoadedResources()
| Elgg\Assets\ExternalFiles::getLoadedResources |
( |
string |
$type, |
|
|
string |
$location |
|
) |
| |
Get external resource descriptors.
- Parameters
-
| string | $type | Type of file: js or css |
| string | $location | Page location |
- Returns
- string[] Resources to load
Definition at line 148 of file ExternalFiles.php.
◆ getSubResourceIntegrity()
| Elgg\Assets\ExternalFiles::getSubResourceIntegrity |
( |
string |
$type, |
|
|
string |
$resource |
|
) |
| |
Returns the integrity related to the resource file.
- Parameters
-
| string | $type | type of resource |
| string | $resource | name of resource |
- Returns
- string|null
Definition at line 200 of file ExternalFiles.php.
◆ load()
| Elgg\Assets\ExternalFiles::load |
( |
string |
$type, |
|
|
string |
$name |
|
) |
| |
Load an external resource for use on this page.
- Parameters
-
| string | $type | Type of file: js or css |
| string | $name | The identifier for the file |
- Returns
- void
Definition at line 115 of file ExternalFiles.php.
◆ register()
| Elgg\Assets\ExternalFiles::register |
( |
string |
$type, |
|
|
string |
$name, |
|
|
string |
$url, |
|
|
string |
$location |
|
) |
| |
Core registration function for external files.
- Parameters
-
| string | $type | Type of external resource (js or css) |
| string | $name | Identifier used as key |
| string | $url | URL |
| string | $location | Location in the page to include the file |
- Returns
- bool
Definition at line 56 of file ExternalFiles.php.
◆ reset()
| Elgg\Assets\ExternalFiles::reset |
( |
| ) |
|
◆ setupType()
| Elgg\Assets\ExternalFiles::setupType |
( |
string |
$type | ) |
|
|
protected |
Bootstraps the externals data structure.
- Parameters
-
| string | $type | The type of external, js or css. |
- Returns
- void
Definition at line 187 of file ExternalFiles.php.
◆ unregister()
| Elgg\Assets\ExternalFiles::unregister |
( |
string |
$type, |
|
|
string |
$name |
|
) |
| |
Unregister an external file.
- Parameters
-
| string | $type | Type of file: js or css |
| string | $name | The identifier of the file |
- Returns
- bool
Definition at line 94 of file ExternalFiles.php.
◆ $files
| array Elgg\Assets\ExternalFiles::$files = [] |
|
protected |
◆ $sri
| Elgg\Assets\ExternalFiles::$sri |
|
protected |
The documentation for this class was generated from the following file: