MODx Debug Console

Purpose

A class designed to help developers impliment a debug console like to the one in Ditto 2

Summary
MODx Debug ConsoleA class designed to help developers impliment a debug console like to the one in Ditto 2
Functions
renderRender the contents of the debug console
saveSave the debug console as a file
makelinkRender the links to the debug console
buildURLBuild a URL with regard to a prefix
makeTabRender a tab
makeMODxSafeMake all MODx tags safe for the output
makeParamTableTurn an array of parameters in the format [“param”] => “value” into a table
cleanArrayRemove empty items from the array
array2tableTranslate a result array into a HTML table

Functions

render

function render($cTabs,
$title,
$base_path)

Render the contents of the debug console

save

function save($html,
$filename)

Save the debug console as a file

makelink

Render the links to the debug console

buildURL

function buildURL($args,  
$id = false,
$prefix = "")

Build a URL with regard to a prefix

makeTab

function makeTab($title,
$content)

Render a tab

makeMODxSafe

function makeMODxSafe($value)

Make all MODx tags safe for the output

makeParamTable

function makeParamTable($parameters = array(),
$header = "",
$sort = true,
$prep = true,
$wordwrap = true)

Turn an array of parameters in the format [“param”] => “value” into a table

cleanArray

function cleanArray($array)

Remove empty items from the array

array2table

function array2table($array,  
$recursive =  false,
$return =  false,
$null =  ' ')

Translate a result array into a HTML table

Author: Aidan Lister ai.nosp@m.dan@php.nosp@m..net

Version: 1.3.1

Link: http://aidanlister.com- /repos- /v- /function.array2table.php

function render($cTabs,
$title,
$base_path)
Render the contents of the debug console
function save($html,
$filename)
Save the debug console as a file
function buildURL($args,  
$id = false,
$prefix = "")
Build a URL with regard to a prefix
function makeTab($title,
$content)
Render a tab
function makeMODxSafe($value)
Make all MODx tags safe for the output
function makeParamTable($parameters = array(),
$header = "",
$sort = true,
$prep = true,
$wordwrap = true)
Turn an array of parameters in the format [“param”] => “value” into a table
function cleanArray($array)
Remove empty items from the array
function array2table($array,  
$recursive =  false,
$return =  false,
$null =  ' ')
Translate a result array into a HTML table