debugTools as $tool): ?>
loader()->getTotalPagesLoaded();
foreach($pages->getCache() as $p) {
$oc++;
$parts = explode('/', trim($p->path, '/'));
$name = array_pop($parts);
$path = implode('/', $parts) . "/$name/";
$path = '/' . ltrim($path, '/');
$path = str_replace("/$name/", "/
$name/", $path);
$o .= "\n
" .
"$p->id | " .
"$path | " .
"" . wireClassName($p) . " | " .
($config->debug === Config::debugVerbose ? "" . $sanitizer->entities($p->_debug_loader) . " | " : "") .
"
";
}
$occ = $oct > $oc ? "$oc/$oct" : $oc;
?>
ID |
Path |
Type |
debug === Config::debugVerbose) echo "Loader | "; ?>
$oc) echo "A total of $oct pages were loaded, $oc of which are in memory:
";
unset($o, $oc, $oct, $occ);
?>
$value) {
if(!is_object($value)) continue;
$apiVars[$key] = $value;
}
ksort($apiVars);
foreach($apiVars as $key => $value) {
$oc++;
$o .= "\n" .
"
" .
"\$$key | " .
"" . get_class($value) . " | " .
"
";
}
unset($apiVars);
?>
$value) {
if(is_object($value)) $value = (string) $value;
if(is_array($value)) $value = print_r($value, true);
$oc++;
$o .= "
$key | " . $sanitizer->entities($value) . " |
";
}
?>
getModuleInfo($module, array('verbose' => false));
$o .=
"
" .
"$info[name] | " .
"$info[version] | " .
"$info[title] | " .
"
";
}
?>
wire()->getHooks('*'), $this->wire('hooks')->getAllLocalHooks());
$hooksSorted = array();
foreach($hooks as $hook) {
$whenKey = $hook['options']['before'] ? '0' : '1';
$sortKey = $hook['options']['fromClass'] . ":$hook[method]:$whenKey:" . $hook['options']['priority'];
$hooksSorted[$sortKey] = $hook;
$oc++;
}
ksort($hooksSorted);
foreach($hooksSorted as $key => $hook) {
$suffix = $hook['options']['type'] == 'method' ? '()' : '';
$toObject = !empty($hook['toObject']) ? $hook['toObject'] : '';
$toMethod = $hook['toMethod'];
if(is_callable($toMethod)) $toMethod = 'anonymous function';
$o .=
"
" .
"" . ($hook['options']['before'] ? 'before ' : '') . ($hook['options']['after'] ? 'after' : '') . " | " .
"" . ($hook['options']['fromClass'] ? $hook['options']['fromClass'] . '::' : '') . "$hook[method]$suffix | " .
"" . ($toObject ? "$toObject::$toMethod" : $toMethod) . "() | " .
"" . ($hook['options']['allInstances'] || $hook['options']['fromClass'] ? "class " : "instance ") . $hook['options']['type'] . " | " .
"" . $hook['options']['priority'] . " | " .
"
";
}
?>
When |
Method::object |
Visited by |
Type |
Priority |
queryLog() as $n => $sql) {
$oc++;
$sql = $sanitizer->entities1($sql);
$o .= "\n
$n | $sql |
---|
";
}
?>
$timer) {
$o .= "
$name | $timer |
---|
";
$oc++;
}
?>
To add more timers here…
Debug::timer('timer-name'); // start timer, you make up the name
execute_some_code(); // any amount of code you want to time
Debug::saveTimer('timer-name', 'optional notes'); // stop and save timer
isInstantiated()): ?>
Mysqli was instantiated and queries were made. These should ideally be converted to PDO ($database). Here are the queries:
$sql) {
$sql = $sanitizer->entities1($sql);
echo "\n$n | $sql |
";
}
?>
Mysqli was instantiated but no queries executed. Here are the callers that should be converted to PDO:
getCallers() as $n => $caller) echo "- " . ($n+1) . ". $caller
"; ?>
roles as $role) echo "\n- {$role->name}
"; ?>
getPermissions() as $permission) echo "\n- {$permission->name}
"; ?>
getPermissions($page) as $permission) echo "\n- {$permission->name}
"; ?>
$type;
$oc = count($i);
if(!$oc) continue;
?>
Key |
Value |
$value) {
if(is_array($value)) $value = print_r($value, true);
echo "" . $sanitizer->entities($key) . " | " . $sanitizer->entities($value) . " |
";
}
unset($oc, $i);
?>
getInfo(true, array(), array('FileCompiler', 'Modules', 'Permissions.')) as $info) {
$oc++;
$o .= "
";
$o .= $sanitizer->entities($info['name']) . " |
";
foreach($info as $key => $value) {
if($key == 'name') continue;
if($key == 'size') $value = wireBytesStr($value);
$key = $sanitizer->entities($key);
$value = $sanitizer->entities($value);
$o .= "$key | $value |
";
}
$o .= "
";
}
?>
Class | File/Details | ";
foreach($classLoader->getDebugLog() as $className => $classFile) {
$oc++;
$className = $sanitizer->entities($className);
$classFile = $sanitizer->entities($classFile);
$o .= "$className | $classFile |
";
}
$o .= "";
?>
debug in file /site/config.php).'); ?>