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


PHP Debugger::maxDepth方法代码示例

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


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

示例1: d10

function d10()
{
    $tmp = Debug::$maxDepth;
    Debug::$maxDepth = 10;
    call_user_func_array('d', func_get_args());
    Debug::$maxDepth = $tmp;
}
开发者ID:vbuilder,项目名称:framework,代码行数:7,代码来源:shortcuts.php

示例2: dump

 public static function dump($var, $label = NULL, $depth = NULL)
 {
     if ($depth !== NULL) {
         $saveDepth = Debugger::$maxDepth;
         Debugger::$maxDepth = $depth;
     }
     $s = Helpers::clickableDump($var);
     if ($label === NULL) {
         self::$dumps[] = $s;
     } else {
         self::$dumps[$label] = $s;
     }
     if ($depth !== NULL) {
         Debugger::$maxDepth = $saveDepth;
     }
 }
开发者ID:jasir,项目名称:RequestsPanel,代码行数:16,代码来源:RequestsPanel.php

示例3: _getPageIdsToDelete

 /**
  * Returns pageIds to be deleted according to rules specified by this table
  * 
  *           P_0(t+1)  |   D_0(t+1) |   T_0(t+1)  |   P_1(t+1) |   W(t+1)  
  *        |----------------------------------------------------------------| 
  * P_-1(t)|   delete   |   delete   |    delete   |      x     |///////////|
  * D_-1(t)|   delete   |   delete   |    delete   |      x     |///////////|
  * P_0(t) |   delete   |      x     |    delete   |      x     |   delete! | 
  * D_0(t) |   delete   |   delete   |    delete   |   delete   |///////////|
  * T_0(t) |   delete   |   delete   |/////////////|   delete   |///////////|
  * P_1(t) |      x     |      x     |   delete(?) |   delete   |///////////|
  *        |----------------------------------------------------------------|
  *
  * $timeZone and $status passed as input arguments represent column indices
  * of the table.
  * 
  * Particular columns
  * ------------------
  * 
  * first index:
  *  P_x - published
  *  D_x - draft
  *  T_x - trashed
  *  W_x - withdrawn
  * 
  * second index:
  *  x_0 - timezone 0 (present)
  *  x_1 - timezone 1 (future)
  * 
  * t is for TIME
  * 
  * Flags:
  *  - delete : delete corresponding row
  *  -   x    : do nothing
  *  - ////// : not specified (cannot occur)
  * 
  * @param type $timeZone
  * @param type $status
  * @param type $allPageVersions
  * @return array
  */
 private function _getPageIdsToDelete($timeZone, $status, $allPageVersions)
 {
     Nette\Diagnostics\Debugger::$maxDepth = 6;
     //dump($timeZone, $status, $allPageVersions);
     $P = 'published';
     $D = 'draft';
     $T = 'trashed';
     $pageIds = array();
     if (isset($allPageVersions[$this->_lang])) {
         $currentLangPageVersions = $allPageVersions[$this->_lang];
         $pairs = array();
         switch ($timeZone) {
             case 0:
             case -1:
                 switch ($status) {
                     case 'published':
                         // 1st column
                         $pairs[] = array($P, -1);
                         $pairs[] = array($D, -1);
                         $pairs[] = array($P, 0);
                         $pairs[] = array($D, 0);
                         $pairs[] = array($T, 0);
                         break;
                     case 'draft':
                         // 2nd column
                         $pairs[] = array($P, -1);
                         $pairs[] = array($D, -1);
                         $pairs[] = array($D, 0);
                         $pairs[] = array($T, 0);
                         break;
                     case 'trashed':
                         // 3rd column
                         $pairs[] = array($P, -1);
                         $pairs[] = array($D, -1);
                         $pairs[] = array($P, 0);
                         $pairs[] = array($D, 0);
                         $pairs[] = array($P, 1);
                         break;
                 }
                 break;
             case 1:
                 switch ($status) {
                     case 'published':
                         // 4th column
                         $pairs[] = array($D, 0);
                         $pairs[] = array($T, 0);
                         $pairs[] = array($P, 1);
                         break;
                 }
         }
         //            dump($pairs);
         //            die();
         $pageIds = $this->_extractPageIds($pairs, $currentLangPageVersions);
     }
     return $pageIds;
 }
开发者ID:jurasm2,项目名称:bubo,代码行数:97,代码来源:AbstractPage.php


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