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


PHP Debugger::barDump方法代码示例

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


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

示例1: dd

/** Bar dump */
function dd($var)
{
    if (func_num_args() > 1) {
        $var = func_get_args();
    } else {
        if (is_array($var)) {
            $var = array(NULL => $var);
        }
    }
    Debugger::barDump($var);
    return func_get_arg(0);
}
开发者ID:rostenkowski,项目名称:HttpPHPUnit,代码行数:13,代码来源:dump.php

示例2: bd

/**
 * Bar dump shortcut.
 * @see Nette\Diagnostics\Debugger::barDump
 * @author Filip Procházka <filip@prochazka.su>
 *
 * @param mixed $var
 * @param string $title
 *
 * @return mixed
 */
function bd($var, $title = NULL)
{
    if (Debugger::$productionMode) {
        return $var;
    }
    $trace = debug_backtrace();
    $traceTitle = (isset($trace[1]['class']) ? htmlspecialchars($trace[1]['class']) . "->" : NULL) . htmlspecialchars($trace[1]['function']) . '()' . ':' . $trace[0]['line'];
    if (!is_scalar($title) && $title !== NULL) {
        foreach (func_get_args() as $arg) {
            Nette\Diagnostics\Debugger::barDump($arg, $traceTitle);
        }
        return $var;
    }
    return Nette\Diagnostics\Debugger::barDump($var, $title ?: $traceTitle);
}
开发者ID:hosiplan,项目名称:project,代码行数:25,代码来源:functions.php

示例3: callback

 /**
  * @param  string|null              $strategy
  * @return IOpauthIdentity
  * @throws InvalidArgumentException
  * @throws InvalidLoginException
  */
 public function callback($strategy)
 {
     if ($strategy === NULL) {
         throw new InvalidLoginException('No auth response. Probably user cancelled the process.');
     }
     if ($this->isFakeStrategy($strategy)) {
         if ($this->config['debug'] != true) {
             throw new InvalidLoginException("Fake login available only in debug mode!");
         }
         return $this->createIdentity(array('uid' => "123123123", 'info' => array('name' => "Chuck Norris", 'image' => "http://placekitten.com/465/465"), 'raw' => array('link' => "http://www.google.com/search?q=chuck+norris", 'email' => "gmail@chucknorris.com", 'given_name' => "Chuck", 'family_name' => "Norris"), 'provider' => 'Google'));
     }
     $Opauth = new \Opauth($this->config, false);
     $response = null;
     switch ($Opauth->env['callback_transport']) {
         case 'session':
             $response = $_SESSION['opauth'];
             unset($_SESSION['opauth']);
             break;
         case 'post':
             $response = unserialize(base64_decode($_POST['opauth']));
             break;
         case 'get':
             $response = unserialize(base64_decode($_GET['opauth']));
             break;
         default:
             throw new InvalidArgumentException("Unsupported callback transport.");
             break;
     }
     if (array_key_exists('error', $response)) {
         throw new InvalidLoginException($response['error']['message']);
     }
     if (empty($response['auth']) || empty($response['timestamp']) || empty($response['signature']) || empty($response['auth']['provider']) || empty($response['auth']['uid'])) {
         throw new InvalidLoginException('Invalid auth response: Missing key auth response components');
     } elseif (!$Opauth->validate(sha1(print_r($response['auth'], true)), $response['timestamp'], $response['signature'], $reason)) {
         throw new InvalidLoginException('Invalid auth response: ' . $reason);
     }
     \Nette\Diagnostics\Debugger::barDump($response['auth'], 'authInfo');
     return $this->createIdentity($response['auth']);
 }
开发者ID:michalsvec,项目名称:nette-opauth,代码行数:45,代码来源:NetteOpauth.php

示例4: dump

 public function dump($value)
 {
     Debugger::barDump($value);
 }
开发者ID:cactucs,项目名称:debugger,代码行数:4,代码来源:nette.php

示例5: bd

/**
 * Shortcut for Debugger::barDump
 *
 * @author   Jan Tvrdík
 * @param    mixed
 * @param    mixed $var, ...       optional additional variable(s) to dump
 * @return   mixed                 the first dumped variable
 */
function bd($var, $title = NULL)
{
    return Debugger::barDump($var, $title);
}
开发者ID:newPOPE,项目名称:web-addons.nette.org,代码行数:12,代码来源:functions.php

示例6: bd

function bd()
{
    foreach (func_get_args() as $m) {
        Nette\Diagnostics\Debugger::barDump($m);
    }
}
开发者ID:vbuilder,项目名称:framework,代码行数:6,代码来源:shortcuts.php


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