aboutsummaryrefslogtreecommitdiffstats
path: root/include/classes/Debugging/Pagelet.php
blob: a06ff4c997ceb1091e021c3d8070d4f130199240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
namespace Debugging;

class Pagelet extends \BigPipe\Pagelet {
	public function __construct($customID = NULL, $priority = self::PRIORITY_NORMAL) {
		parent::__construct(...func_get_args());

		foreach(['INIT', 'LOADCSS', 'HTML', 'LOADJS', 'DONE'] as $phase) {
			$code = 'console.log("PhaseDoneJS for Pagelet %%c#%s%%c: %s", "color:#008B45", "color:inherit")';
			$this->addPhaseDoneJS(constant("self::PHASE_$phase"), sprintf($code, $this->getID(), $phase));
		}
	}
}
?>