本文整理汇总了PHP中Symfony\Component\VarDumper\Dumper\CliDumper::dumpLine方法的典型用法代码示例。如果您正苦于以下问题:PHP CliDumper::dumpLine方法的具体用法?PHP CliDumper::dumpLine怎么用?PHP CliDumper::dumpLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\VarDumper\Dumper\CliDumper
的用法示例。
在下文中一共展示了CliDumper::dumpLine方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dumpLine
/**
* {@inheritdoc}
*/
protected function dumpLine($depth, $endOfValue = false)
{
if (-1 === $this->lastDepth && isset($_SERVER['REQUEST_TIME_FLOAT'])) {
if ($this->colors) {
echo sprintf("[%sm%s[m", $this->styles['ref'], $this->prefix());
} else {
echo $this->prefix();
}
echo "\n";
}
$this->lastDepth = $depth;
parent::dumpLine($depth, $endOfValue);
}
示例2: dumpLine
/**
*
* {@inheritdoc}
*
*/
protected function dumpLine($depth, $endOfValue = false)
{
if ($endOfValue && 0 < $depth) {
$this->line .= ',';
}
$this->line = $this->formatter->format($this->line);
parent::dumpLine($depth, $endOfValue);
}
示例3: dumpLine
/**
* {@inheritdoc}
*/
protected function dumpLine($depth)
{
if (-1 === $this->lastDepth) {
$this->line = sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad).$this->line;
}
if (!$this->headerIsDumped) {
$this->line = $this->getDumpHeader().$this->line;
}
if (-1 === $depth) {
$this->line .= sprintf($this->dumpSuffix, $this->dumpId);
}
$this->lastDepth = $depth;
// Replaces non-ASCII UTF-8 chars by numeric HTML entities
$this->line = preg_replace_callback(
'/[\x80-\xFF]+/',
function ($m) {
$m = unpack('C*', $m[0]);
$i = 1;
$entities = '';
while (isset($m[$i])) {
if (0xF0 <= $m[$i]) {
$c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80;
} elseif (0xE0 <= $m[$i]) {
$c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80;
} else {
$c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80;
}
$entities .= '&#'.$c.';';
}
return $entities;
},
$this->line
);
if (-1 === $depth) {
parent::dumpLine(0);
}
parent::dumpLine($depth);
}