diff options
author | Thomas Lange <code@nerdmind.de> | 2015-12-26 16:37:25 +0100 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2015-12-26 16:37:25 +0100 |
commit | 6658708bdd775a6ab1352e0c36b4c7deafc52e84 (patch) | |
tree | e95ef6b6fb67e0d1ca42221e94631fa6123b6f22 /include/classes/BigPipe/DemoPagelet.php | |
parent | 903100ecb99ab926d4ac3be4eba11ea1c9800e12 (diff) | |
download | bigpipe-6658708bdd775a6ab1352e0c36b4c7deafc52e84.tar.gz bigpipe-6658708bdd775a6ab1352e0c36b4c7deafc52e84.tar.xz bigpipe-6658708bdd775a6ab1352e0c36b4c7deafc52e84.zip |
Multiple updates; new feature PhaseDoneJS
Diffstat (limited to 'include/classes/BigPipe/DemoPagelet.php')
-rwxr-xr-x | include/classes/BigPipe/DemoPagelet.php | 17 |
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 |