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


PHP Debugger::maxLen方法代码示例

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


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

示例1: createLoginProviderEntity

 /**
  * @return LoginProviderEntity
  * @throws \Nette\InvalidStateException
  * @throws \Nette\InvalidArgumentException
  */
 protected function createLoginProviderEntity()
 {
     $type = $this->getOpauthType();
     $params = array('path' => $this->getCallbackUrl(), 'callback_url' => $this->getCallbackUrl(), 'Strategy' => array($type => $this->getConfig()));
     Debugger::$maxLen = 10000;
     $this->opauth = new Opauth($params, FALSE);
     $this->opauth->strategy = Strings::lower($type);
     $response = null;
     switch ($this->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 ($response === NULL) {
         if (isset($_GET['_opauth_action'])) {
             $action = explode('/', $_GET['_opauth_action']);
             $this->opauth->action = $action[1];
         }
         $this->opauth->run();
     }
     if (array_key_exists('error', $response)) {
         throw new InvalidStateException($response['error']['message']);
     }
     if (empty($response['auth']) || empty($response['timestamp']) || empty($response['signature']) || empty($response['auth']['provider']) || empty($response['auth']['uid'])) {
         throw new InvalidStateException('Invalid auth response: Missing key auth response components');
     } elseif (!$this->opauth->validate(sha1(print_r($response['auth'], true)), $response['timestamp'], $response['signature'], $reason)) {
         throw new InvalidStateException('Invalid auth response: ' . $reason);
     }
     $ret = new LoginProviderEntity($response['auth']['uid'], static::getType());
     $this->fillLoginEntity($ret, $response['auth']['raw']);
     return $ret;
 }
开发者ID:venne,项目名称:opauth-module,代码行数:47,代码来源:AbstractLogin.php

示例2:

 *
 * Copyright (c) 2006, 2011 Patrik Votoček (http://patrik.votocek.cz)
 *
 * This source file is subject to the GNU Lesser General Public License. For more information please see http://nella-project.org
 */

use Nette\Diagnostics\Debugger;

// Load and init Nette Framework
if (!defined('NETTE')) {
	require_once __DIR__ . "/../Nette/loader.php";
}

// Set debug options
Debugger::$strictMode = TRUE;
Debugger::$maxLen = 4096;

/**
 * Load and configure Nella Framework
 */
define('NELLA_FRAMEWORK', TRUE);
define('NELLA_FRAMEWORK_DIR', __DIR__);
define('NELLA_FRAMEWORK_VERSION_ID', 20000); // v2.0.0

require_once __DIR__ . "/SplClassLoader.php";
Nella\SplClassLoader::getInstance(array(
	'Nella' => NELLA_FRAMEWORK_DIR,
	'Doctrine' => __DIR__ . "/../Doctrine",
	'Symfony' => __DIR__ . "/../Symfony",
))->register();
开发者ID:norbe,项目名称:framework,代码行数:30,代码来源:loader.php


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