Output/Element.php
/**
     * Prepares a text line with ANSI escape codes.
     *
     * @param array $line
     * @access protected
     * @return string
     */
Prepares a text line with ANSI escape codes.
@param array $line
@access protected
@return string
Prepares a text line with ANSI escape codes . @param array $line @access protected @return string
protected function _prepareLine($line)
    {
        $text = '';
        $color = array();
        $reset = '';
        if (isset($line['text'])) {
            $text = $line['text'];
        }
        if (isset($line['color'])) {
            $color[] = $this->_getFgColor($line['color']);
        }
        if (isset($line['background'])) {
            $color[] = $this->_getBgColor($line['background']);
        }
        if ($color) {
            $color = "\033[" . implode(';', $color) . 'm';
            $reset = "\033[0m";
        } else {
            $color = '';
        }
        return $color . $text . $reset;
    }
protected function _prepareLine ( $ line ) { $ text = '' ; $ color = array ( ) ; $ reset = '' ; if ( isset ( $ line [ 'text' ] ) ) { $ text = $ line [ 'text' ] ; } if ( isset ( $ line [ 'color' ] ) ) { $ color [ ] = $ this -> _getFgColor ( $ line [ 'color' ] ) ; } if ( isset ( $ line [ 'background' ] ) ) { $ color [ ] = $ this -> _getBgColor ( $ line [ 'background' ] ) ; } if ( $ color ) { $ color = " \033 [ " . implode ( ';' , $ color ) . 'm' ; $ reset = " \033 [0m " ; } else { $ color = '' ; } return $ color . $ text . $ reset ; }
Prepares a text line with ANSI escape codes.
Prepares a text line with ANSI escape codes .