Exemplo n.º 1
0
 /**
  * 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);
     }
 }
Exemplo n.º 2
0
 /**
  * @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);
 }
Exemplo n.º 3
0
 /**
  * 
  * @return array
  */
 public function Debug()
 {
     Debug::PrintValue($this->_debugInfo);
     Debug::PrintValue($this->_collection);
 }
Exemplo n.º 4
0
 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}");
         }
     }
 }
Exemplo n.º 5
0
 public function __destruct()
 {
     $this->_end = microtime(true);
     $result = $this->_end - $this->_start;
     if ($this->_context->getDebugStatus()) {
         Debug::PrintValue("Total Execution Time: " . $result . " seconds ");
     }
 }
Exemplo n.º 6
0
 public function Debug()
 {
     Debug::PrintValue($this->_config);
 }
Exemplo n.º 7
0
 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);
 }