aboutsummaryrefslogtreecommitdiffstats
path: root/include/classes/BigPipe/DemoPagelet.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/classes/BigPipe/DemoPagelet.php')
-rwxr-xr-xinclude/classes/BigPipe/DemoPagelet.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/classes/BigPipe/DemoPagelet.php b/include/classes/BigPipe/DemoPagelet.php
new file mode 100755
index 0000000..a6c61e1
--- /dev/null
+++ b/include/classes/BigPipe/DemoPagelet.php
@@ -0,0 +1,17 @@
+<?php
+namespace BigPipe;
+
+class DemoPagelet extends Pagelet {
+
+ public function __construct($priority = Pagelet::PRIORITY_NORMAL) {
+ parent::__construct($priority);
+
+ $message = '%s: PhaseDoneJS for phase %s';
+
+ $this->addPhaseDoneJS(self::PHASE_ARRIVE, 'console.log("'.sprintf($message, $this->getID(), 'ARRIVE').'")');
+ $this->addPhaseDoneJS(self::PHASE_LOADCSS, 'console.log("'.sprintf($message, $this->getID(), 'LOADCSS').'")');
+ $this->addPhaseDoneJS(self::PHASE_PUTHTML, 'console.log("'.sprintf($message, $this->getID(), 'PUTHTML').'")');
+ $this->addPhaseDoneJS(self::PHASE_LOADJS, 'console.log("'.sprintf($message, $this->getID(), 'LOADJS').'")');
+ $this->addPhaseDoneJS(self::PHASE_EXECJS, 'console.log("'.sprintf($message, $this->getID(), 'EXECJS').'")');
+ }
+} \ No newline at end of file