aboutsummaryrefslogtreecommitdiffstats
path: root/include/classes/BigPipe/DemoPagelet.php
blob: 83689bad4c60313fd70a6b4e9e6da897f06d4104 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
namespace BigPipe;

class DemoPagelet extends Pagelet {

	public function __construct($customID = NULL, $priority = Pagelet::PRIORITY_NORMAL) {
		parent::__construct($customID, $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').'")');
	}
}