當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CliDumper::dumpLine方法代碼示例

本文整理匯總了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);
 }
開發者ID:cawaphp,項目名稱:cawa,代碼行數:16,代碼來源:CliDumper.php

示例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);
 }
開發者ID:sapwoo,項目名稱:portfolio,代碼行數:13,代碼來源:Dumper.php

示例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);
    }
開發者ID:pombredanne,項目名稱:ArcherSys,代碼行數:47,代碼來源:HtmlDumper.php


注:本文中的Symfony\Component\VarDumper\Dumper\CliDumper::dumpLine方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。