diff options
author | Thomas Lange <code@nerdmind.de> | 2017-10-04 16:50:42 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2017-10-04 16:52:18 +0200 |
commit | 2a1d85fdd1a0fb256e46013bb4c64470ab0ec2fd (patch) | |
tree | 3073ac73b46ee09b9cdce99ccef146b0e38752b2 /include/classes/BigPipe | |
parent | dc36b1efebbe2a7f8f73c66a8689c5aeaa97e4b9 (diff) | |
download | bigpipe-2a1d85fdd1a0fb256e46013bb4c64470ab0ec2fd.tar.gz bigpipe-2a1d85fdd1a0fb256e46013bb4c64470ab0ec2fd.tar.xz bigpipe-2a1d85fdd1a0fb256e46013bb4c64470ab0ec2fd.zip |
A new method called "getPriority" has been implemented, which returns the priority of the corresponding Pagelet instance.
Diffstat (limited to 'include/classes/BigPipe')
-rwxr-xr-x | include/classes/BigPipe/Pagelet.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/classes/BigPipe/Pagelet.php b/include/classes/BigPipe/Pagelet.php index 42ea470..484a6e2 100755 --- a/include/classes/BigPipe/Pagelet.php +++ b/include/classes/BigPipe/Pagelet.php @@ -11,6 +11,7 @@ namespace BigPipe; class Pagelet extends Item { private $HTML = ''; private $JSCode = []; + private $priority = NULL; private $resources = []; private $dependencies = []; private $tagname = 'div'; @@ -38,6 +39,7 @@ class Pagelet extends Item { public function __construct($customID = NULL, $priority = self::PRIORITY_NORMAL) { $this->ID = $customID ?? 'P'.++self::$count; + $this->priority = $priority; $this->resources = array_pad($this->resources, 2, []); $this->phaseDoneJS = array_pad($this->phaseDoneJS, 5, []); @@ -45,6 +47,13 @@ class Pagelet extends Item { } #=============================================================================== + # Return the priority + #=============================================================================== + public function getPriority() { + return $this->priority; + } + + #=============================================================================== # Return the HTML content #=============================================================================== public function getHTML() { |