Initial commit
This commit is contained in:
commit
1ff19bf38f
830 changed files with 159212 additions and 0 deletions
36
kirby/vendor/filp/whoops/src/Whoops/Util/HtmlDumperOutput.php
vendored
Normal file
36
kirby/vendor/filp/whoops/src/Whoops/Util/HtmlDumperOutput.php
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Util;
|
||||
|
||||
/**
|
||||
* Used as output callable for Symfony\Component\VarDumper\Dumper\HtmlDumper::dump()
|
||||
*
|
||||
* @see TemplateHelper::dump()
|
||||
*/
|
||||
class HtmlDumperOutput
|
||||
{
|
||||
private $output;
|
||||
|
||||
public function __invoke($line, $depth)
|
||||
{
|
||||
// A negative depth means "end of dump"
|
||||
if ($depth >= 0) {
|
||||
// Adds a two spaces indentation to the line
|
||||
$this->output .= str_repeat(' ', $depth) . $line . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
public function getOutput()
|
||||
{
|
||||
return $this->output;
|
||||
}
|
||||
|
||||
public function clear()
|
||||
{
|
||||
$this->output = null;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue