protected function box(array $lines)
    {
        if (count($lines) > 0) {
            $width = strlen($lines[0]);
        } else {
            $width = 0;
        }
        $head = $this->options['boxTopLeftChar']
                . str_pad('', $width, $this->options['boxHorizChar'])
                . $this->options['boxTopRightChar']
                . $this->options['lineEnd'];
        $tail = $this->options['boxBotLeftChar']
                . str_pad('', $width, $this->options['boxHorizChar'])
                . $this->options['boxBotRightChar']
                . $this->options['lineEnd'];
        $output = '';
        foreach ($lines as $line) {
            $output .= $this->options['boxVertChar']
                    . $line
                    . $this->options['boxVertChar']
                    . $this->options['lineEnd'];
        }

        return $head . $output . $tail;
    }
protected function box(array $lines)
    {
        if (count($lines) > 0) {
            $width = strlen($lines[0]);
        } else {
            $width = 0;
        }
        $head = $this->options['boxTopLeftChar']
                . str_pad('', $width, $this->options['boxHorizChar'])
                . $this->options['boxTopRightChar']
                . $this->options['lineEnd'];
        $tail = $this->options['boxBotLeftChar']
                . str_pad('', $width, $this->options['boxHorizChar'])
                . $this->options['boxBotRightChar']
                . $this->options['lineEnd'];
        $output = '';
        foreach ($lines as $line) {
            $output .= $this->options['boxVertChar']
                    . $line
                    . $this->options['boxVertChar']
                    . $this->options['lineEnd'];
        }

        return $head . $output . $tail;
    }
protected function box ( array $ lines ) { if ( count ( $ lines ) > 0 ) { $ width = strlen ( $ lines [ 0 ] ) ; } else { $ width = 0 ; } $ head = $ this -> options [ 'boxTopLeftChar' ] . str_pad ( '' , $ width , $ this -> options [ 'boxHorizChar' ] ) . $ this -> options [ 'boxTopRightChar' ] . $ this -> options [ 'lineEnd' ] ; $ tail = $ this -> options [ 'boxBotLeftChar' ] . str_pad ( '' , $ width , $ this -> options [ 'boxHorizChar' ] ) . $ this -> options [ 'boxBotRightChar' ] . $ this -> options [ 'lineEnd' ] ; $ output = '' ; foreach ( $ lines as $ line ) { $ output .= $ this -> options [ 'boxVertChar' ] . $ line . $ this -> options [ 'boxVertChar' ] . $ this -> options [ 'lineEnd' ] ; } return $ head . $ output . $ tail ; }
Create output with box around matrix

@param array $lines
@return string
Create output with box around matrix