本文整理汇总了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;
}
示例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();