本文整理汇总了PHP中Debugbar::debug方法的典型用法代码示例。如果您正苦于以下问题:PHP Debugbar::debug方法的具体用法?PHP Debugbar::debug怎么用?PHP Debugbar::debug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Debugbar
的用法示例。
在下文中一共展示了Debugbar::debug方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: store
/**
* Store a new DMCA notice.
*
* @param Request $request
*
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function store(Request $request)
{
\Debugbar::debug($request->request);
// debug($request);
$notice = $this->createNotice($request);
Mail::queue(['text' => 'emails.dmca'], compact('notice'), function ($message) use($notice) {
$message->from($notice->getOwnerEmail())->to($notice->getRecipientEmail())->subject('DMCA Notice');
});
flash('Your DMCA notice has been delivered!');
return redirect('notices');
}
示例2: obfuscateFileContents
/**
* Obfuscate a single file's contents
*
* @param string $source
* @return string obfuscated contents
**/
public function obfuscateFileContents($source, $file = false)
{
$traverser = new PhpParser\NodeTraverser();
if (input::get('ReplaceVariables')) {
/**
* all $vars
*/
$traverser->addVisitor(new \Controllers\Obfuscator\ScrambleVariable($this));
$traverser->addVisitor(new \Controllers\Obfuscator\ScrambleString($this));
}
if (input::get('ReplaceFunctions')) {
/**
* all OOP functions
*/
$traverser->addVisitor(new \Controllers\Obfuscator\ScrambleFunction($this));
/**
* all NONE OOP functions (NATIVE)
*/
$traverser->addVisitor(new \Controllers\Obfuscator\ScrambleNativeFunction($this));
}
if (input::get('ReplaceVariables')) {
/**
* all OOP $this->vars
*/
$traverser->addVisitor(new \Controllers\Obfuscator\ScrambleProperty($this));
}
//if( input::get('ReplaceSmart') ) {
//$traverser->addVisitor(new \Controllers\Obfuscator\ScrambleSmart($this));
//}
$parser = new Parser(new Lexer());
// traverse
$stmts = $traverser->traverse($parser->parse($source));
$prettyPrinter = new PrettyPrinter();
$nodeDumper = new PhpParser\NodeDumper();
Debugbar::debug($stmts);
// pretty print
$code = "<?php\n" . $prettyPrinter->prettyPrint($stmts);
if (Input::has('test')) {
@header("Content-Type:text/plain");
print_r($this->getFuncPack());
print_r($this->getVarPack());
echo '<pre>';
echo $nodeDumper->dump($stmts), "\n";
echo htmlentities($code);
echo '</pre>';
}
return $code;
}
示例3:
<div {{ $field->formgroup() }}>
<label for="{{ $field->name() }}" class="control-label">
{{ $field->label() }}
</label>
<div class="row">
@foreach( $field->options() as $key => $val )
<div class="checkbox col-md-3">
<label>
<?php
Debugbar::debug($field->selected());
?>
@if( ! is_null( $field->selected() ) && $key === $field->selected() )
{{ Form::radio( $field->name() , $key , true ) . $val }}
@else
{{ Form::radio( $field->name() , $key , false ) . $val }}
@endif
</label>
</div>
@endforeach
</div>
<div class="text-danger">
{{ $field->errors() }}
</div>
</div>