84 $name =
trim(strtolower($name));
85 if (empty($name) || empty($url)) {
89 $url = $this->urls->normalizeUrl($url);
121 public function unregister(
string $type,
string $name): bool {
124 $name =
trim(strtolower($name));
126 if (!isset($this->
files[$type][$name])) {
130 unset($this->
files[$type][$name]);
142 public function load(
string $type,
string $name):
void {
145 $name =
trim(strtolower($name));
151 $item->loaded =
true;
158 if ($this->views->viewExists($name)) {
159 $item->url = $this->simpleCache->getUrl($name);
160 $item->location = ($type ===
'js') ?
'footer' :
'head';
176 if (!isset($this->
files[$type])) {
183 $items = array_filter(
$items,
function($v) use ($location) {
184 return $v->loaded ==
true && $v->location ==
$location;
187 $cache_ts = $this->config->lastcache;
188 $cache_url = $this->config->wwwroot .
"cache/{$cache_ts}/default/";
191 array_walk(
$items,
function(&$v, $k) use ($type, $cache_url) {
215 if (!isset($this->
files[$type])) {
228 if (!$this->config->subresource_integrity_enabled) {
232 if (!isset($this->sri)) {
233 $this->sri = $this->serverCache->load(
'sri') ?? [];
if(!$user||!$user->canDelete()) $name
c Accompany it with the information you received as to the offer to distribute corresponding source complete source code means all the source code for all modules it plus any associated interface definition plus the scripts used to control compilation and installation of the executable as a special the source code distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable If distribution of executable or object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place counts as distribution of the source even though third parties are not compelled to copy the source along with the object code You may not or distribute the Program except as expressly provided under this License Any attempt otherwise to sublicense or distribute the Program is void
reset()
Unregister all files.
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
load(string $type, string $name)
Load an external resource for use on this page.
c Accompany it with the information you received as to the offer to distribute corresponding source complete source code means all the source code for all modules it plus any associated interface definition files
if(!empty($avatar)&&!$avatar->isValid()) elseif(empty($avatar)) if(!$owner->saveIconFromUploadedFile('avatar')) if(!elgg_trigger_event('profileiconupdate', $owner->type, $owner)) $view
unregister(string $type, string $name)
Unregister an external file.
setupType(string $type)
Bootstraps the externals data structure.
getSubResourceIntegrity(string $type, string $resource)
Returns the integrity related to the resource file.
__construct(Config $config, Urls $urls, ViewsService $views, SimpleCache $simpleCache, SystemCache $serverCache)
Constructor.
foreach($plugin_guids as $guid) if(empty($deactivated_plugins)) $url
getLoadedResources(string $type, string $location)
Get external resource descriptors.
Create, sanitize and compare urls.