/** * XMLNukeException base Exception * * @param type $message * @param type $code * @param type $previous */ public function __construct($message = "", $code = null, $previous = null) { $this->message = $message; $this->backTrace = Debug::GetBackTrace(); $this->showStackTrace = true; if (PHP_VERSION_ID < 50300) { parent::__construct($message, $code); } else { parent::__construct($message, $code, $previous); } }
/** * @param string $module * @param Exception $error * @return void */ public static function LogError($module, $error) { if ($error instanceof Exception) { $chamada = get_class($error); $mensagem = $error->getMessage(); } else { $chamada = "ERROR"; $mensagem = $error; } Debug::LogText($chamada . ": {$module}: " . $mensagem); }
/** * * @return array */ public function Debug() { Debug::PrintValue($this->_debugInfo); Debug::PrintValue($this->_collection); }
protected function DebugInfo($sql, $param) { if ($this->_context->getDebugStatus()) { Debug::PrintValue("<hr>"); Debug::PrintValue("Class name: " . get_class($this)); Debug::PrintValue("SQL: " . $sql); if ($param != null) { $s = ""; foreach ($param as $key => $value) { if ($s != "") { $s .= ", "; } $s .= "[{$key}]={$value}"; } Debug::PrintValue("Params: {$s}"); } } }
public function __destruct() { $this->_end = microtime(true); $result = $this->_end - $this->_start; if ($this->_context->getDebugStatus()) { Debug::PrintValue("Total Execution Time: " . $result . " seconds "); } }
public function Debug() { Debug::PrintValue($this->_config); }
protected function Opcao11() { $block = new XmlBlockCollection("Exemplo 11: DualList", BlockPosition::Center); //XmlnukeBreakLine br = new XmlnukeBreakLine(); if ($this->isPostBack()) { Debug::PrintValue(XmlDualList::Parse($this->_context, "frmdual")); } $form = new XmlFormCollection($this->_context, $this->_url . "?op=11", "Formulário com Um Dual List"); // Create DualList Object $duallist = new XmlDualList($this->_context, "frmdual", "Não Selecionado", "Selecionado"); $duallist->setDualListSize(10, 10); $duallist->createDefaultButtons(); // Define DataSet Source $arrayLeft = array("A" => "Letra A", "B" => "Letra B", "C" => "Letra C", "D" => "Letra D", "E" => "Letra E", "F" => "Letra F"); $arrayRight = array("B" => "Letra B", "D" => "Letra D"); $arrayDBLeft = new ArrayDataset($arrayLeft); $itLeft = $arrayDBLeft->getIterator(); $arrayDBRight = new ArrayDataset($arrayRight); $itRight = $arrayDBRight->getIterator(); $duallist->setDataSourceFieldName("key", "value"); $duallist->setDataSource($itLeft, $itRight); $form->addXmlnukeObject($duallist); $button = new XmlInputButtons(); $button->addSubmit("Enviar Dados"); $form->addXmlnukeObject($button); $block->addXmlnukeObject($form); $this->_document->addXmlnukeObject($block); }