-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJSResource.php
More file actions
executable file
·41 lines (37 loc) · 1.34 KB
/
JSResource.php
File metadata and controls
executable file
·41 lines (37 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
namespace TestPlugin {
/**
* A class used to represent a JS file/resource.
* */
class JSResource {
public static $SCRIPTTYPE = [
"DEFER" => 2,
"ASYNC" => 1,
"STANDARD" => 0
];
public $handle = "";
public $version = "";
public $localURL = "";
public $externalURL = "";
public $integrityMetadata = "";
public $fallbackScriptNames = [];
public $dependencies = [];
public $scriptType = 0;
public $inFooter = false;
public $extraAttributes = [];
public $extraDataToPass = NULL;
public function __construct($handle="",$localURL="",$dependencies=[],$ver="",$footer=false,$extURL="",$fallbacks=[],$integrity="",$type=0, $attrs=[], $extraDataToPass = NULL) {
$this->handle = $handle;
$this->localURL = $localURL;
$this->dependencies = $dependencies;
$this->version = $ver;
$this->inFooter = $footer;
$this->externalURL = $extURL;
$this->fallbackScriptNames = $fallbacks;
$this->integrityMetadata = $integrity;
$this->scriptType = $type;
$this->extraAttributes = $attrs;
$this->extraDataToPass = $extraDataToPass;
}
}
}