Elgg  Version 3.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Elgg\Assets\ExternalFiles Class Reference

WARNING: API IN FLUX. More...

Public Member Functions

 register ($type, $name, $url, $location, $priority=500)
 Core registration function for external files. More...
 
 unregister ($type, $name)
 Unregister an external file. More...
 
 getFile ($type, $name)
 Get metadata for a registered file. More...
 
 load ($type, $name)
 Load an external resource for use on this page. More...
 
 getLoadedFiles ($type, $location)
 Get external resource descriptors. More...
 
 getRegisteredFiles ($type, $location)
 Get registered file objects. More...
 
 reset ()
 Unregister all files. More...
 

Protected Member Functions

 setupType ($type)
 Bootstraps the externals data structure. More...
 

Protected Attributes

 $externals = []
 
 $externals_map = []
 

Detailed Description

WARNING: API IN FLUX.

DO NOT USE DIRECTLY.

Definition at line 13 of file ExternalFiles.php.

Member Function Documentation

Elgg\Assets\ExternalFiles::getFile (   $type,
  $name 
)

Get metadata for a registered file.

Parameters
string$typeType of file: js or css
string$nameThe identifier of the file
Returns
|null

Definition at line 113 of file ExternalFiles.php.

Elgg\Assets\ExternalFiles::getLoadedFiles (   $type,
  $location 
)

Get external resource descriptors.

Parameters
string$typeType of file: js or css
string$locationPage location
Returns
string[] URLs of files to load

Definition at line 173 of file ExternalFiles.php.

Elgg\Assets\ExternalFiles::getRegisteredFiles (   $type,
  $location 
)

Get registered file objects.

Parameters
string$typeType of file: js or css
string$locationPage location
Returns
[]

Definition at line 199 of file ExternalFiles.php.

Elgg\Assets\ExternalFiles::load (   $type,
  $name 
)

Load an external resource for use on this page.

Parameters
string$typeType of file: js or css
string$nameThe identifier for the file
Returns
void

Definition at line 139 of file ExternalFiles.php.

Elgg\Assets\ExternalFiles::register (   $type,
  $name,
  $url,
  $location,
  $priority = 500 
)

Core registration function for external files.

Parameters
string$typeType of external resource (js or css)
string$nameIdentifier used as key
string$urlURL
string$locationLocation in the page to include the file
int$priorityLoading priority of the file
Returns
bool

Definition at line 36 of file ExternalFiles.php.

Elgg\Assets\ExternalFiles::reset ( )

Unregister all files.

Returns
void

Definition at line 222 of file ExternalFiles.php.

Elgg\Assets\ExternalFiles::setupType (   $type)
protected

Bootstraps the externals data structure.

Parameters
string$typeThe type of external, js or css.
Returns
void

Definition at line 233 of file ExternalFiles.php.

Elgg\Assets\ExternalFiles::unregister (   $type,
  $name 
)

Unregister an external file.

Parameters
string$typeType of file: js or css
string$nameThe identifier of the file
Returns
bool

Definition at line 91 of file ExternalFiles.php.

Member Data Documentation

Elgg\Assets\ExternalFiles::$externals = []
protected

Definition at line 18 of file ExternalFiles.php.

Elgg\Assets\ExternalFiles::$externals_map = []
protected

Definition at line 23 of file ExternalFiles.php.


The documentation for this class was generated from the following file: