* @version $Id: Debug.php,v 1.16 2004/04/21 20:43:38 darren Exp $
* @package Core
*/
class PHPWS_Debug {
/**
* flag whether or not class is active or not
* @var bool
*/
var $active = 0;
/**
* flag whether or not to dump post variables
* @var bool
*/
var $dumpPost = 0;
/**
* flag whether or not to dump get variables
* @var bool
*/
var $dumpGet = 0;
/**
* flag whether or not to dump request variables
* @var bool
*/
var $dumpRequest = 0;
/**
* flag whether of not to dump the core dump
* @var bool
*/
var $dumpCore = 0;
/**
* array of session objects to dump
* @var array
*/
var $sessionObjects = array();
/**
* array of session arrays to dump
* @var array
*/
var $sessionArrays = array();
/**
* array of other session vars to dump
* @var array
*/
var $sessionOthers = array();
/**
* flag whether or not to dump file variables
* @var bool
*/
var $dumpFile = 0;
/**
* flag whether or not to dump cookie variables
* @var bool
*/
var $dumpCookie = 0;
/**
* flag whether or not to dump server variables
* @var bool
*/
var $dumpServer = 0;
/**
* flag whether of not to dump error message variable
* @var bool
*/
var $errorMsg = 0;
/**
* flag whether of not to dump debug display before execution
* @var bool
*/
var $beforeExecution = 0;
/**
* flag whether of not to dump debug display after execution
* @var bool
*/
var $afterExecution = 0;
/**
* flag whether of not to display time info
* @var bool
*/
var $showTimer = 0;
var $showBlock = 0;
/**
* Constructor (not needed at this point)
*/
function PHPWS_debug() {}
/**
* various get and set functions, pretty self-explanitory
*/
function setShowTimer($activity) {$this->showTimer = $activity;}
function setDumpCore($activity) {$this->dumpCore = $activity;}
function setDumpPost($activity) {$this->dumpPost = $activity;}
function setDumpGet($activity) {$this->dumpGet = $activity;}
function setDumpRequest($activity) {$this->dumpRequest = $activity;}
function setDumpFile($activity) {$this->dumpFile = $activity;}
function setDumpCookie($activity) {$this->dumpCookie = $activity;}
function setDumpServer($activity) {$this->dumpServer = $activity;}
function setBeforeExecution($activity) {$this->beforeExecution = $activity;}
function setAfterExecution($activity) {$this->afterExecution = $activity;}
function setShowBlock($activity) {$this->showBlock = $activity;}
function getShowTimer() {return $this->showTimer;}
function getDumpCore() {return $this->dumpCore;}
function getDumpPost() {return $this->dumpPost;}
function getDumpGet() {return $this->dumpGet;}
function getDumpRequest() {return $this->dumpRequest;}
function getDumpFile() {return $this->dumpFile;}
function getDumpCookie() {return $this->dumpCookie;}
function getDumpServer() {return $this->dumpServer;}
function getBeforeExecution() {return $this->beforeExecution;}
function getAfterExecution() {return $this->afterExecution;}
function getShowBlock() {return $this->showBlock;}
function setActive($activity) {$this->active = $activity;}
function isActive() {return $this->active;}
function setActivity() {
PHPWS_WizardBag::toggle($this->active);
}
/**
* adminSettings
*
* displays the debug options
*/
function adminSettings() {
$title = $_SESSION['translate']->it("phpWebSite Debugger Settings");
$hiddens = array("module"=>"debug",
"DBUG_op"=>"save_settings");
$elements[0] = PHPWS_Form::formHidden($hiddens);
$elements[0] .= "
" . $_SESSION['translate']->it("Select the information for debug display.") . "