From 21824df56bd13d81f10ac0b86c5cad31def51f3e Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Sat, 25 Jun 2016 15:34:34 +0200 Subject: Update with new features and code improvements. + New classes have been added: "BigPipe\Resource", "BigPipe\Resource\CSS", "BigPipe\Resource\JS". If you wan't to add a resource to a Pagelet, you can now built a new resource object with the "CSS" or "JS" class (the "Resource" class is abstract and the parent class of "CSS" and "JS") and can add PhaseDoneJS callbacks for this resources with "Resource::addPhaseDoneJS()" similar to "Pagelet::addPhaseDoneJS()". To add the resource to your pagelet: "$Pagelet->addResource($Resource)". Of course, you can still use the two SHORT methods "Pagelet::addCSS()" and "Pagelet::addJS()" which needs only one parameter with the resource URL. + Each resource has now PhaseDoneJS callbacks for 3 phases (Object initializied [INIT], Loading started [LOAD], Loading complete [DONE]). + Check your usage of the PhaseDoneJS callback constants of the Pagelet class: These constants have been renamed. + Debugging mode: Just set BigPipe::debugging(TRUE) and each pagelet and resource will be pass through a function which adds PhaseDoneJS callbacks with debug informations (Look now at the Javascript console and enjoy the beautiful colors which makes the debug informations better readable for your eyes. \(o_o)/). + Several code improvements on almost all files. --- include/classes/BigPipe/DemoPagelet.php | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100755 include/classes/BigPipe/DemoPagelet.php (limited to 'include/classes/BigPipe/DemoPagelet.php') diff --git a/include/classes/BigPipe/DemoPagelet.php b/include/classes/BigPipe/DemoPagelet.php deleted file mode 100755 index adb9f89..0000000 --- a/include/classes/BigPipe/DemoPagelet.php +++ /dev/null @@ -1,17 +0,0 @@ -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 -- cgit v1.2.3