Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
Debug.php
Go to the documentation of this file.
1<?php
2namespace Ubiquity\debug;
3
4
6
16class Debug {
23 public static function liveReload(int $port=35729):string{
24 if(!URequest::isAjax()) {
25 return '<script>document.write(\'<script src="http://\' + (location.host || \'localhost\').split(\':\')[0] +
26 \':' . $port . '/livereload.js?snipver=1"></\' + \'script>\')</script>';
27 }
28 return '';
29 }
30
36 public static function hasLiveReload():bool{
37 $exitCode=0;
38 \exec('livereload --version', $_, $exitCode);
39 return $exitCode == 1;
40 }
41}
Class for debug in dev mode.
Definition Debug.php:16
static hasLiveReload()
Definition Debug.php:36
static liveReload(int $port=35729)
Definition Debug.php:23
Http Request utilities, wrapper for accessing to $_GET, $_POST and php://input.
Definition URequest.php:18