本文整理汇总了PHP中Tracy\Debugger::dump方法的典型用法代码示例。如果您正苦于以下问题:PHP Debugger::dump方法的具体用法?PHP Debugger::dump怎么用?PHP Debugger::dump使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracy\Debugger
的用法示例。
在下文中一共展示了Debugger::dump方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dump
/**
* Tracy\Debugger::dump() shortcut.
* @tracySkipLocation
*/
function dump($var)
{
foreach (func_get_args() as $arg) {
Debugger::dump($arg);
}
return $var;
}
示例2: dumpHtml
/**
* Dump rendered Html element or code and intended output generated by tidy and optional also Html element structure
*
* @param Html|string $htmlElement Html element or string
* @param bool $onlyReturn output in string and don't send it to output?
* @param int $maxDepth for Debugger::Dump output - to see how is the Html element built
* @param bool $includePrettyPrint along javascript code for prettyPrint activation?
* @return string Html output
*/
function dumpHtml($htmlElement, $onlyReturn = false, $maxDepth = 0, $includePrettyPrint = false)
{
$maxDepthBackup = Debugger::$maxDepth;
$maxLenBackup = Debugger::$maxLen;
$showLocationBackup = Debugger::$showLocation;
Debugger::$maxDepth = $maxDepth;
Debugger::$maxLen = 200000;
Debugger::$showLocation = false;
// convert to string only once - important for Scaffolding Renderer output
$renderedElement = (string) $htmlElement;
$output = '<div class="rendered-element">' . $renderedElement . '</div>';
$output .= '<pre class="prettyprint linenums pre-scrollable">' . htmlspecialchars(tidyFormatString($renderedElement)) . '</pre>';
if ($includePrettyPrint) {
$output .= '<script>prettyPrint();</script>';
}
if ($maxDepth > 0 && $htmlElement instanceof \Latte\Runtime\Html) {
Debugger::dump($renderedElement);
Debugger::dump($htmlElement);
}
Debugger::$maxDepth = $maxDepthBackup;
Debugger::$maxLen = $maxLenBackup;
Debugger::$showLocation = $showLocationBackup;
if (!$onlyReturn) {
echo $output;
}
return $output;
}
示例3: de
/**
* Shortcut for Debugger::dump & exit()
*
* @author Jan Tvrdík
* @param mixed
* @param mixed $var , ... optional additional variable(s) to dump
* @return void
*/
function de($var)
{
foreach (func_get_args() as $var) {
Debugger::dump($var);
}
exit;
}
示例4: dd
/**
* Dump; die;
*/
function dd()
{
foreach (func_get_args() as $var) {
Debugger::dump($var);
}
die;
}
示例5: dump
/**
* Вывод содержимого переменной
*
* @param $var
* @param bool $return
* @param bool $exit
*
* @return mixed|void
*/
public static function dump($var, $return = false, $exit = true)
{
parent::$maxDepth = 15;
ob_get_contents() || ob_get_length() ? ob_clean() : null;
parent::dump($var, $return);
!$exit ?: exit;
}
示例6: getPanel
public function getPanel()
{
$output = null;
if (is_user_logged_in()) {
$currentUser = wp_get_current_user();
$output = parent::getTablePanel(array(__("ID") => $currentUser->ID, __("Login") => $currentUser->user_login, __("E-mail") => $currentUser->user_email, __("Display Name") => $currentUser->display_name, __("First Name") => $currentUser->first_name, __("Last Name") => $currentUser->last_name, __("Roles") => Debugger::dump($currentUser->roles, true), __("Allcaps") => Debugger::dump($currentUser->allcaps, true)));
}
return $output;
}
示例7: renderSuccess
/**
* @param $paymentSessionId
* @param $targetGoId
* @param $orderNumber
* @param $encryptedSignature
*/
public function renderSuccess($paymentSessionId, $targetGoId, $orderNumber, $encryptedSignature)
{
$order = $this->gopayModel->getOrder($paymentSessionId);
if ($order instanceof IRow) {
$payment = $this->gopay->restorePayment(array('sum' => $order->sum, 'variable' => $order->variable, 'specific' => 0, 'productName' => "Test"), array('paymentSessionId' => $paymentSessionId, 'targetGoId' => $targetGoId, 'orderNumber' => $orderNumber, 'encryptedSignature' => $encryptedSignature));
Debugger::dump($payment);
Debugger::dump($payment->isFraud());
Debugger::dump($payment->isPaid());
}
}
示例8: send
public function send(Mail $mail)
{
try {
$this->mailer->send($mail);
$this->model->insert(array('adress' => implode(',', $mail->getAddress()), 'text' => $mail->getText(), 'subject' => $mail->getSubject()));
} catch (\Nette\Mail\SmtpException $e) {
\Tracy\Debugger::dump($e);
exit;
$this->model->insert(array('adress' => implode(',', $mail->getAddress()), 'text' => $mail->getText(), 'subject' => $mail->getSubject(), 'error' => $e->getMessage()));
throw $e;
}
}
示例9: getPanel
public function getPanel()
{
/* @var $wpdb \WP */
global $wp;
global $wp_version;
global $wp_db_version;
global $tinymce_version;
global $required_php_version;
global $required_mysql_version;
global $pagenow;
$output = parent::getTablePanel(array(__("WP Version") => $wp_version, __("WP DB Version ") => $wp_db_version, __("TinyMCE Version ") => $tinymce_version, __("Required PHP Version") => $required_php_version, __("Required MySQL Version") => $required_mysql_version, __("Page Now") => $pagenow, __("WP") => Debugger::dump($wp, true)));
return $output;
}
示例10: getPanel
/**
* Returns HTML code for custom panel. (Tracy\IBarPanel)
* @return mixed
*/
public function getPanel()
{
$cnt = 0;
$s = "";
foreach ($this->queries as $q) {
$s .= "<tr><td>" . sprintf('%0.2f', $q->time * 1000) . "</td>" . "<td>" . $q->fname . "(<a href='#tracy-debug-Skautis-args-row-{$cnt}' class='tracy-toggle tracy-collapsed' rel='#tracy-debug-Skautis-args-row-{$cnt}'>Args</a>)" . "<div id='tracy-debug-Skautis-args-row-{$cnt}' class='tracy-collapsed'>" . Debugger::dump(reset($q->args[0]), TRUE) . "</div></td>" . "<td><a href='#tracy-debug-Skautis-row-{$cnt}' class='tracy-toggle tracy-collapsed'>Result</a>" . "<div id='tracy-debug-Skautis-row-{$cnt}' class='tracy-collapsed'>" . Debugger::dump($q->result, TRUE) . "</div></td>" . "<td>" . $this->prepareTrace($q->trace) . "" . "</td>" . "<td><a href='#tracy-debug-Skautis-response-row-{$cnt}' class='tracy-toggle tracy-collapsed'>XML Response</a>" . "<div id='tracy-debug-Skautis-response-row-{$cnt}' class='tracy-collapsed'>" . htmlspecialchars($q->response) . "</div></td>" . "</tr>";
$cnt++;
}
return empty($this->queries) ? '' : '<h1>Skautis</h1><div class="tracy-inner">
<table>
<tr><th>Time ms</th><th>Function name</th><th>Result</th><th>Trace</th><th>Response</th></tr>' . $s . '
</table>
</div>';
}
示例11: vp_display_system_info_array
function vp_display_system_info_array($array, $outputFormat)
{
switch ($outputFormat) {
case 've':
// var_export
echo '<pre><code style="language-php">';
echo esc_html(var_export($array, true));
echo '</code></pre>';
break;
case 'tc':
\Tracy\Debugger::dump($array);
break;
}
}
示例12: displaySystemInfoArray
function displaySystemInfoArray($array)
{
global $outputFormat;
switch ($outputFormat) {
case 've':
// var_export
echo '<pre><code style="language-php">';
echo htmlspecialchars(var_export($array, true));
echo '</code></pre>';
break;
case 'tc':
\Tracy\Debugger::dump($array);
break;
}
}
示例13: newDeveloper
/**
* Dumps public and secret key for the new developer.
* @param string Slug which serves as public key comment. It's typically
* developer's name. Can contain only these characters: '0-9A-Za-z./'.
*/
public static function newDeveloper($slug)
{
$password = \Nette\Utils\Random::generate(32, '!-~');
// This is sufficient for strong security.
$secret = $slug . '@' . $password;
$public = $slug . '@' . \Nette\Security\Passwords::hash($password);
echo "<h1>Public key</h1>";
\Tracy\Debugger::dump($public);
echo "<h1>Secret key</h1>";
\Tracy\Debugger::dump($secret);
echo "<h1>Secret key (URL encoded)</h1>";
\Tracy\Debugger::dump(urlencode($secret));
die;
}
示例14: var_dump
<?php
require_once 'vendor/autoload.php';
\Tracy\Debugger::enable();
\Tracy\Debugger::$maxDepth = 32;
$loader = new \Nette\Loaders\RobotLoader();
$loader->addDirectory('Billers');
$loader->setCacheStorage(new \Nette\Caching\Storages\FileStorage('cache'));
$loader->register();
$biller = new \CzechCash\Billers\Billers\OptimalPayments\OptimalPaymentsBiller();
var_dump($biller->isServiceAvailable());
$expiry = new \CzechCash\Billers\Structures\CreditCards\CreditCardExpiry('09/16');
$card = new \CzechCash\Billers\Structures\CreditCards\CreditCard('4107857757053670', $expiry, 123);
$details = ['street' => 'abcd', 'city' => 'efgh', 'state' => 'cjdsfkjds', 'country' => 'AD', 'zip' => 'fjsdkfjsd'];
try {
\Tracy\Debugger::dump($biller->createCreditCardPayment(10, $card, $details)->process());
} catch (OptimalPayments\NetbanxException $e) {
\Tracy\Debugger::dump($e);
}
示例15: renderDefault
public function renderDefault()
{
$this->template->kategories = $this->menuModel->nactiKategorie();
$this->template->menu = $this->menuModel->nactiMenu();
Debugger::dump($this->menuModel->nactiMenu());
}