PHP Class Elgg\Assets\ExternalFiles

Since: 1.10.0
Mostrar archivo Open project: elgg/elgg

Public Methods

Method Description
__construct ( stdClass $config = null ) Constructor
getLoadedFiles ( string $type, string $location ) : array Get external resource descriptors
load ( string $type, string $name ) : void Load an external resource for use on this page
register ( string $type, string $name, string $url, string $location, integer $priority = 500 ) : boolean Core registration function for external files
unregister ( string $type, string $name ) : boolean Unregister an external file

Protected Methods

Method Description
bootstrap ( string $type ) : null Bootstraps the externals data structure in $_ELGG.

Method Details

__construct() public method

Constructor
public __construct ( stdClass $config = null )
$config stdClass Predefined configuration in format used by global $CONFIG variable

bootstrap() protected method

Bootstraps the externals data structure in $_ELGG.
protected bootstrap ( string $type ) : null
$type string The type of external, js or css.
return null

getLoadedFiles() public method

Get external resource descriptors
public getLoadedFiles ( string $type, string $location ) : array
$type string Type of file: js or css
$location string Page location
return array

load() public method

Load an external resource for use on this page
public load ( string $type, string $name ) : void
$type string Type of file: js or css
$name string The identifier for the file
return void

register() public method

Core registration function for external files
public register ( string $type, string $name, string $url, string $location, integer $priority = 500 ) : boolean
$type string Type of external resource (js or css)
$name string Identifier used as key
$url string URL
$location string Location in the page to include the file
$priority integer Loading priority of the file
return boolean

unregister() public method

Unregister an external file
public unregister ( string $type, string $name ) : boolean
$type string Type of file: js or css
$name string The identifier of the file
return boolean