当前位置: 首页>>代码示例>>PHP>>正文


PHP Debug::print_r方法代码示例

本文整理汇总了PHP中Debug::print_r方法的典型用法代码示例。如果您正苦于以下问题:PHP Debug::print_r方法的具体用法?PHP Debug::print_r怎么用?PHP Debug::print_r使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Debug的用法示例。


在下文中一共展示了Debug::print_r方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: autoErrorReport

 public function autoErrorReport()
 {
     if (defined('DEV') && DEV == true && $this->success == FALSE && $this->query !== NULL) {
         if (!class_exists('Debug')) {
             include_once "library/facil3/utils/Debug.class.php";
         }
         Debug::print_r($this);
     }
 }
开发者ID:reytuty,项目名称:facil,代码行数:9,代码来源:ReturnDataVO.class.php

示例2: newConnection

 private function newConnection($id)
 {
     $connectionData = Model::getConnectionsData();
     // Run::$DEBUG_PRINT = 1;
     if (!$id) {
         foreach ($connectionData as $k => $v) {
             if ($v['type_db'] == "postgre") {
                 $id = $k;
                 break;
             }
         }
     }
     if (isset($connectionData[$id])) {
         Debug::log("Iniciando POSTGRE.", __LINE__, __FUNCTION__, __CLASS__, __FILE__);
         $data = $connectionData[$id];
         Debug::print_r("data", $data);
         if (self::$active == false) {
             self::$active = $id;
         }
         $host = $data["host"];
         $name = $data["database"];
         $user = $data["user"];
         $pass = $data["pass"];
         $this->schema = $data["schema"];
         if ($host && $name && $user) {
             try {
                 self::$connection[$id] = pg_connect('host=' . $host . ' dbname=' . $name . ' user=' . $user . ' password=' . $pass);
             } catch (Exception $e) {
                 Error::show(5200, "Erro ao conectar ao POSTGRE. Mensagem:" . $e->getMessage(), __FILE__, __LINE__, '');
                 return -2;
             }
             if (self::$connection[$id]->connect_error) {
                 ob_flush();
                 flush();
                 Error::show(5200, "Erro ao conectar ao POSTGRE. Código:" . Run::$control->string->encoding(pg_last_error(self::$connection[$id]) . ' -- Mensagem:' . pg_last_error(self::$connection[$id])), __FILE__, __LINE__, '');
                 return -2;
             }
         } else {
             Error::show(5200, "Não conecta no POSTGRE: " . $host . " / " . $name . " / " . $user . " / ", __FILE__, __LINE__, '');
             return -2;
         }
     } else {
         Error::show(0, "Dados de conexão <b>{$id}</b> não foram definidos ", __FILE__, __LINE__, '');
         exit;
     }
 }
开发者ID:obscurun,项目名称:run-dev,代码行数:46,代码来源:postgre.php

示例3: newConnection

 private function newConnection($id)
 {
     $connectionData = Model::getConnectionsData();
     if (!$id) {
         foreach ($connectionData as $k => $v) {
             if ($v['type_db'] == "mysql") {
                 $id = $k;
                 break;
             }
         }
     }
     //Run::$DEBUG_PRINT = 1;
     //Debug::print_r("__construct", $id);
     if (isset($connectionData[$id])) {
         $data = $connectionData[$id];
         //Debug::print_r("data ", $data);
         Debug::log("Iniciando Mysqli.", __LINE__, __FUNCTION__, __CLASS__, __FILE__);
         self::$active = $id;
         $host = $data["host"];
         $name = $data["database"];
         $user = $data["user"];
         $pass = $data["pass"];
         $this->schema = $data["schema"];
         if ($host && $name && $user) {
             //echo "$host, $user, $pass, $name";
             self::$connection[$id] = new mysqli($host, $user, $pass, $name);
             self::$connection[$id]->set_charset("utf8");
             Debug::print_r("conectando mysql {$id} ");
             if (self::$connection[$id]->connect_error) {
                 ob_flush();
                 flush();
                 Error::show(5200, "Erro ao conectar ao Mysqli (<b>{$id}</b>). Código:" . Run::$control->string->encoding(self::$connection[$id]->connect_errno . ' -- Mensagem:' . self::$connection[$conn]->connect_error), __FILE__, __LINE__, '');
                 return -2;
             } else {
                 self::$connection[$id]->set_charset("utf8");
             }
         } else {
             Error::show(5200, "Não conecta no MYSQLI (<b>{$id}</b>): " . $host . " / " . $name . " / " . $user . " / ", __FILE__, __LINE__, '');
             return -2;
         }
     } else {
         Error::show(0, "Dados de conexão <b>{$id}</b> não foram definidos ", __FILE__, __LINE__, '');
         exit;
     }
 }
开发者ID:obscurun,项目名称:run-dev,代码行数:45,代码来源:mysql.php

示例4: delDataSession

 public function delDataSession()
 {
     // método para deletar o dataForm na sessão
     Debug::print_r("delDataSession");
     Run::$session->del(array("forms", $this->getFormSessionId()));
 }
开发者ID:obscurun,项目名称:run-dev,代码行数:6,代码来源:session.php

示例5: dev__teste__teste2

 public function dev__teste__teste2()
 {
     echo "<br clear='all' /><br clear='all' /> <br clear='all' /> teste 2 <br clear='all' /> ";
     Debug::print_r(Language::$phrases);
 }
开发者ID:obscurun,项目名称:run-dev,代码行数:5,代码来源:home_control.php

示例6: init

 public function init()
 {
     $returnResult = new HttpResult();
     $returnResult->setSuccess(1);
     //iniciando o resultado para o html
     $retornoDaPaginaHTML = new HttpMenu();
     //inicia a variavel de consulta de obj para cache
     $obj = NULL;
     $save_cache = TRUE;
     $cache_base_folder = "cache/menu/init/";
     if (Config::USE_QUERY_CACHE) {
         //verifica se tem cache
         $cache_folder = $cache_base_folder;
         $cache_file = md5(implode("/", $this->arrayRestFolder));
         /*
         Debug::print_r($this->arrayRestFolder);
         echo Debug::li($cache_file);
         */
         $cache_location = $cache_folder . $cache_file;
         if (file_exists($cache_location)) {
             $resultSerial = unserialize(file_get_contents($cache_location));
             //return $resultSerial;
             $obj = $resultSerial;
             $save_cache = FALSE;
         }
     }
     //o cache não está gravado
     if ($obj == NULL) {
         $obj = $this;
         //pedindo para consultar
         $this->consultValues();
     }
     $retornoDaPaginaHTML->arrayMaterial = $obj->arrayMaterial->result;
     $retornoDaPaginaHTML->arrayColor = $obj->arrayColor->result;
     $retornoDaPaginaHTML->arrayStyle = $obj->arrayStyle->result;
     $retornoDaPaginaHTML->arrayFormat = $obj->arrayFormat->result;
     $retornoDaPaginaHTML->arrayTheme = $obj->arrayTheme->result;
     $retornoDaPaginaHTML->arrayComposition = $obj->arrayComposition->result;
     $retornoDaPaginaHTML->arrayTechnique = $obj->arrayTechnique->result;
     $retornoDaPaginaHTML->arrayType = $obj->arrayType->result;
     $botaoPromocoes = new stdClass();
     $botaoPromocoes->name = "em promoção";
     //echo Debug::li($this->currentQuery);exit();
     if (!$this->currentQuery) {
         $this->currentQuery = "SELECT count( DISTINCT `view_product_model_quadro_b`.id) as count FROM `view_product_model_quadro_b` WHERE 1 AND view_product_model_quadro_b.`active` = '1'";
     }
     $queryPromocao = $this->currentQuery . " AND promocao = 1 ";
     //oic 2
     $dbi = new DbInterface();
     $rt = $dbi->query($queryPromocao);
     //echo Debug::li($this->currentQuery);
     if (isset($_GET["teste"])) {
         Debug::print_r($rt);
     }
     $rt->fetchAll();
     //Debug::print_r($rt);exit();
     $botaoPromocoes->id = 1;
     $botaoPromocoes->total = $rt->result[0]->count;
     //total de produtos em promoção
     $retornoDaPaginaHTML->arrayPromocoes = array($botaoPromocoes);
     $retornoDaPaginaHTML->requestMaterial = $obj->requestMaterial;
     $retornoDaPaginaHTML->requestColor = $obj->requestColor;
     $retornoDaPaginaHTML->requestStyle = $obj->requestStyle;
     $retornoDaPaginaHTML->requestFormat = $obj->requestFormat;
     $retornoDaPaginaHTML->requestTheme = $obj->requestTheme;
     $retornoDaPaginaHTML->requestComposition = $obj->requestComposition;
     $retornoDaPaginaHTML->requestTechnique = $obj->requestTechnique;
     $retornoDaPaginaHTML->requestType = $obj->requestType;
     $retornoDaPaginaHTML->requestSearch = $obj->requestSearch;
     $retornoDaPaginaHTML->requestResumeSearch = $obj->requestResumeSearch;
     $retornoDaPaginaHTML->requestPromocao = $obj->requestPromocao;
     $retornoDaPaginaHTML->arrayRestFolder = $this->arrayRestFolder;
     $retornoDaPaginaHTML->arrayVariable = $this->arrayVariable;
     $retornoDaPaginaHTML->url_final = $obj->url_final;
     //salvando o objeto de resultado de html no retorno
     $returnResult->setHttpContentResult($retornoDaPaginaHTML);
     // -------------------------------------------------------------------[ BREAD CRUMB ]
     // Agora criando a array de bread crumb
     $retornoDaPaginaHTML->arrayBreadCrumb = $this->arrayBreadCrumb;
     // E também popula os títulos, que até então ele não tinha como pegar
     foreach ($retornoDaPaginaHTML->arrayBreadCrumb as $BreadCrumbInfoVO) {
         //pelo tipo de item e id ele ve o nome
         if (FALSE) {
             //apenas para o auto completar do eclipse
             $BreadCrumbInfoVO = new BreadCrumbInfoVO();
         }
         $BreadCrumbInfoVO->tittle = $retornoDaPaginaHTML->getNameByTypeAndId($BreadCrumbInfoVO->reference, $BreadCrumbInfoVO->id);
     }
     if (Config::USE_QUERY_CACHE && $save_cache) {
         //grava o cache
         DataHandler::createRecursiveFoldersIfNotExists($cache_folder);
         //criando obj simplificado para serializar
         $stdObj = new stdClass();
         $stdObj->arrayMaterial = $obj->arrayMaterial;
         $stdObj->arrayColor = $obj->arrayColor;
         $stdObj->arrayStyle = $obj->arrayStyle;
         $stdObj->arrayFormat = $obj->arrayFormat;
         $stdObj->arrayTheme = $obj->arrayTheme;
         $stdObj->arrayComposition = $obj->arrayComposition;
         $stdObj->arrayTechnique = $obj->arrayTechnique;
//.........这里部分代码省略.........
开发者ID:reytuty,项目名称:facil,代码行数:101,代码来源:RootMenu.class.php

示例7: foreach

					<li style="margin-left:60px;"><a href="<?php 
echo Config::getRootPath('produtos');
?>
">Produtos</a></li>
					<li><a href="<?php 
echo Config::getRootPath('clientes');
?>
">clientes</a></li>
				</ul>
				<div id="line"></div>
			</div>
			<div id="products">
				<?php 
foreach ($HttpContentResult->produtos as $produto) {
    ?>
				<div class="products" id="products-<?php 
    echo $i;
    ?>
">
					<?php 
    Debug::print_r($produto);
    ?>
				</div>
				<?php 
}
?>
	
			</div>
	<div>
</body>
</html>
开发者ID:reytuty,项目名称:facil,代码行数:31,代码来源:index.php

示例8: init

 /**
  * para detalhe de um produto
  */
 public function init()
 {
     //Debug::print_r($this->arrayVariable);
     //filtro vindo por parametro é o addres que ele tem que enviar de volta como busca
     //rel ids de produtos relacionados
     //exit();
     //echo 12;
     $id = DataHandler::forceInt(DataHandler::getValueByArrayIndex($this->arrayVariable, "id"));
     if ($id > 0) {
         $ContentSiteVO = new ContentSiteVO();
         $ReturnResult_vo = $ContentSiteVO->setId($id, TRUE);
         if ($ReturnResult_vo->success) {
             $stdProduct = $ContentSiteVO->toStdClass();
             $stdProduct->array_gallery = $ContentSiteVO->getImages(NULL, "gallery", true);
             $stdProduct->array_dimensions = $ContentSiteVO->getImages(NULL, "dimensions", true);
             $stdProduct->array_video = $ContentSiteVO->getImages(NULL, "video", true);
             $stdProduct->array_360 = $ContentSiteVO->getImages(NULL, "360", true);
             $stdProduct->array_tagged = $ContentSiteVO->getImages(NULL, "tagged", true);
             $LinkDAO = LinkDAO::getInstance();
             //passo 1, descobrir a qual família esse protudo pertence
             //passo 2, pegar todos os produtos pertencente a mesma família
             //passo 3, tirar o próprio produto da listagem de produtos da mesma família
             $array_links = array();
             $resultLinks = $LinkDAO->select(DbInterface::RETURN_STD_OBJECT, "content", $table_id = null, $linked_table = 'content', $linked_table_id = $id, $active = 1, $quant_started = NULL, $quant_limit = NULL, $order_by = "order", $order_type = " ASC ");
             if ($resultLinks->success && $resultLinks->count_total > 0) {
                 foreach ($resultLinks->result as $familia) {
                     $link = $familia;
                     //$resultLinks->result[0];
                     $ContentFamiliaVO = new ContentSiteVO();
                     $ContentFamiliaVO->setId($link->table_id, TRUE);
                     Debug::print_r($ContentFamiliaVO);
                     exit;
                     if ($ContentFamiliaVO->active > 0) {
                         $arrayResult_links = $ContentFamiliaVO->getLinks("content");
                         foreach ($arrayResult_links as $link) {
                             if ($link->linked_table_id != $id) {
                                 $ResultTempLink = $link->getLinkedVO();
                                 if ($ResultTempLink->success) {
                                     $produtoVO = $ResultTempLink->result;
                                     if ($produtoVO->active > 0) {
                                         $stdProduto = $produtoVO->toStdClass();
                                         $stdProduto->array_tagged = $produtoVO->getImages(NULL, "tagged", NULL);
                                         $array_links[] = $stdProduto;
                                     }
                                     //Debug::print_r($stdProduto);exit();
                                 }
                             }
                             //end if
                         }
                         //end foerach
                     }
                 }
             }
             //verifica a qual familia esse produto pertence
             $stdProduct->array_produtos_vinculados = $array_links;
             //Debug::print_r($array_links);
             //exit();
             //pegando array de vinculados enviados como id
             $str_ids_send = DataHandler::getValueByArrayIndex($this->arrayVariable, "rel");
             $array_ids_send = explode("|", $str_ids_send);
             $array_filtro = array();
             foreach ($array_ids_send as $id) {
                 $ContentSiteVO = new ContentSiteVO();
                 $tempResult = $ContentSiteVO->setId($id, TRUE);
                 if ($tempResult->success) {
                     $stdProduto = $ContentSiteVO->toStdClass();
                     $stdProduto->array_tagged = $ContentSiteVO->getImages(NULL, "tagged", NULL);
                     $array_filtro[] = $stdProduto;
                 }
             }
             $stdProduct->array_filtro = $array_filtro;
             //Debug::print_r($array_links);
             $returnResult = new HttpResult();
             //exit();
             //iniciando o resultado para o html
             $retornoDaPaginaHTML = new HttpRoot();
             $retornoDaPaginaHTML->vo = $stdProduct;
             $retornoDaPaginaHTML->addressToReturn = str_replace("|", "/", DataHandler::getValueByArrayIndex($this->arrayVariable, "filtro"));
             $strToResend = implode("/", $this->arrayRestFolder);
             $strToResend = explode("/:/", $strToResend);
             if (is_array($strToResend) && count($strToResend) > 1) {
                 $strToResend = $strToResend[1];
             } else {
                 $strToResend = "";
             }
             $retornoDaPaginaHTML->addressToResend = $strToResend;
             $returnResult->setHttpContentResult($retornoDaPaginaHTML);
             return $returnResult;
         } else {
             Navigation::redirect("");
         }
     } else {
         //não mandou o id, vai pra listagem
         Navigation::redirect("produtos");
     }
 }
开发者ID:reytuty,项目名称:facil,代码行数:99,代码来源:Produto.php

示例9: buildSaveSQL

 private function buildSaveSQL($orderTables, $dataTables, $schema, $refTableIndex = false, $refPkId = 0)
 {
     //Run::$DEBUG_PRINT = 1;
     $fieldsRec = array();
     //Debug::print_r($orderTables);
     foreach ($orderTables as $k => $refs) {
         if (!isset($refs['table'])) {
             continue;
         }
         $this->deletePKFromMultipleRegistersTable($refs, $k, $schema);
         $data = $dataTables[$k];
         $tableIsMultiple = false;
         if (isset($refs['multiple']) && $refs['multiple'] === true) {
             //$dataCheck			= (is_array($data[$refTableIndex])) ? $data[$refTableIndex] : $data;
             //$totalMultiple 		= $this->getTotalMultipleFieldsBytable($k, $dataCheck, $schema, $refs['pk'], $refTableIndex);
             $dataLevel = $this->getLevelDataMulti($data);
             $dataIndexs = $this->getIndexsMultipleFieldsByTable($k, $data, $schema, $refs['pk'], $refTableIndex, $refPkId, $dataLevel);
             $totalMultiple = count($dataIndexs);
             //Debug::print_r("dataIndexs Array:: ",$dataIndexs);
             $tableIsMultiple = true;
         } else {
             $totalMultiple = 1;
         }
         Debug::print_r("buildSaveSQL {$k} | refTableIndex : {$refTableIndex} | refPkId : {$refPkId} - - - - - - - - - - SAVE {$refs['table']}: {$k}  / multiplos: " . $totalMultiple . " - - refTableIndex: {$refTableIndex}- - - - - - - - - - - - - - - - -");
         //reset($data);
         for ($i = 0; $i < $totalMultiple; $i++) {
             $reIndexed = $dataIndexs[$i];
             $fields = "";
             $values = "";
             $update_fields = "";
             if (!$tableIsMultiple) {
                 $dataPK = $data[$refs['pk']];
             } else {
                 if ($dataLevel == 2) {
                     $dataPK = $data[$reIndexed][$refs['pk']];
                 } else {
                     if ($dataLevel == 3) {
                         $dataPK = $data[$refTableIndex][$reIndexed][$refs['pk']];
                     }
                 }
             }
             //Debug::print_r(" data:", $data);
             //Debug::print_r("dataPK $k : ".$dataPK ." // dataLevel:".$dataLevel);
             $typeSave = $dataPK > 0 ? "update" : "insert";
             $saveFileData = array("index" => false, "name" => false, "fieldRef" => false, "path" => false);
             //Debug::print_r("for $i / dataPK: $dataPK ");
             //Debug::print_r($data[$i]);
             // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
             if (isset($refs['fk_ref'])) {
                 $fields .= ",\n\t" . $refs['fk_ref'] . "";
                 $values .= ",\n\t'" . $orderTables['fk_ref_value'] . "'";
                 $update_fields .= ",\n\t" . $refs['fk_ref'] . " = '" . $orderTables['fk_ref_value'] . "'";
             }
             // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
             $skipRec = false;
             foreach ($schema['fields'] as $kF => $field) {
                 if ($field['belongsTo'] == $k && ($dataPK > 0 && $kF == $refs['pk'] || $kF != $refs['pk'])) {
                     if ($typeSave == "insert" && $field[$typeSave] !== false || $typeSave == "update" && $field[$typeSave] !== false) {
                         if ($tableIsMultiple) {
                             //if($k == "et")	//Debug::print_r($data[$refTableIndex][$i]);
                             //if($k == "et")	//Debug::print_r("$k /kF $kF /i $i =".$data[$refTableIndex][$i][$kF]);
                             if ($field['type'] == "date_insert" || $field['type'] == "date_update") {
                                 $data_multiple = $data[$kF];
                             } else {
                                 if ($field['type'] == "int" || $field['type'] == "integer") {
                                     $data_multiple = is_array($data[$refTableIndex][$reIndexed]) ? $data[$refTableIndex][$reIndexed][$kF] : (int) $data[$reIndexed][$kF];
                                 } else {
                                     $data_multiple = is_array($data[$refTableIndex][$reIndexed]) ? $data[$refTableIndex][$reIndexed][$kF] : $data[$reIndexed][$kF];
                                     //Debug::p("data ", $data);
                                     //Debug::p("data_multiple  / $reIndexed / $kF /".$data[$reIndexed][$kF], $data);
                                     //Debug::p("data_multiple ", $data[$reIndexed][$kF]);
                                 }
                             }
                             if ($field['skipRecEmpty'] === true && $this->getValueArray($data_multiple) == "") {
                                 continue 2;
                             }
                             if ($field['skipFieldEmpty'] === true && $this->getValueArray($data_multiple) == "") {
                                 continue;
                             }
                             $field_name = $field['name'] != "" ? $field['name'] : $kF;
                             $fields .= ",\n\t" . $field_name . "";
                             $values .= ",\n\t'" . $this->getValueArray($data_multiple) . "'";
                             $update_fields .= ",\n\t" . $field_name . " = '" . $this->getValueArray($data_multiple) . "'";
                             if ($field['type'] == "file_name") {
                                 $saveFileData['name'] = $this->getValueArray($data_multiple);
                             }
                             if ($field['type'] == "file_path") {
                                 $saveFileData['index'] = $reIndexed;
                                 $saveFileData['fieldRef'] = $field['fieldRef'];
                                 $saveFileData['path'] = $this->getValueArray($data_multiple);
                                 //Debug::p("saveFileData", $saveFileData);
                             }
                             if ($field['type'] == "file_path" && $saveFileData['path'] == $saveFileData['name'] && !is_array($data_multiple)) {
                                 continue 2;
                             }
                             //Debug::p("add: ($reIndexed)".$field_name ." / PK: ". $dataPK ." /kF = ". $kF ." /Total = ". $totalMultiple ." /reIndexed = ".$reIndexed);
                             //if($kF == "tipo") //Debug::p("$i $kF :".$data_multiple);
                             //if($kF == "tipo") //Debug::p($data[$refTableIndex][$i][$kF]);
                         } else {
                             if ($field['type'] == "file_name") {
//.........这里部分代码省略.........
开发者ID:obscurun,项目名称:run-dev,代码行数:101,代码来源:save_data.php

示例10: register

 public function register()
 {
     Debug::print_r($_POST);
     exit;
 }
开发者ID:reytuty,项目名称:facil,代码行数:5,代码来源:Login.php


注:本文中的Debug::print_r方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。