writeWithColor() protected method

Writes a buffer out with a color sequence if colors are enabled.
protected writeWithColor ( string $color, string $buffer, boolean $lf = true )
$color string
$buffer string
$lf boolean
Exemplo n.º 1
0
 protected function writeWithColor($color, $buffer, $lf = true)
 {
     if ($this->capture) {
         $this->color = $color;
         $this->buffer .= $buffer;
     } else {
         parent::writeWithColor($color, $buffer, $lf);
     }
 }
Exemplo n.º 2
0
 public function writeWithColor($color, $text)
 {
     $this->write('<div class="color $color">');
     parent::writeWithColor($color, $text);
     $this->write('</div>');
 }