function _buildTable() {
        if (!count($this->_data)) {
            return '';
        }

        $vertical = $this->_border['vertical'];
        $separator = $this->_getSeparator();

        $return = array();
        for ($i = 0; $i < count($this->_data); $i++) {
            for ($j = 0; $j < count($this->_data[$i]); $j++) {
                if ($this->_data[$i] !== self::CONSOLE_TABLE_HORIZONTAL_RULE &&
                    $this->_strlen($this->_data[$i][$j]) <
                    $this->_cell_lengths[$j]
                ) {
                    $this->_data[$i][$j] = $this->_strpad($this->_data[$i][$j],
                        $this->_cell_lengths[$j],
                        ' ',
                        $this->_col_align[$j]);
                }
            }

            if ($this->_data[$i] !== self::CONSOLE_TABLE_HORIZONTAL_RULE) {
                $row_begin = $this->_borderVisibility['left']
                    ? $vertical . str_repeat(' ', $this->_padding)
                    : '';
                $row_end = $this->_borderVisibility['right']
                    ? str_repeat(' ', $this->_padding) . $vertical
                    : '';
                $implode_char = str_repeat(' ', $this->_padding) . $vertical
                    . str_repeat(' ', $this->_padding);
                $return[] = $row_begin
                    . implode($implode_char, $this->_data[$i]) . $row_end;
            } elseif (!empty($separator)) {
                $return[] = $separator;
            }

        }

        $return = implode(PHP_EOL, $return);
        if (!empty($separator)) {
            if ($this->_borderVisibility['inner']) {
                $return = $separator . PHP_EOL . $return;
            }
            if ($this->_borderVisibility['bottom']) {
                $return .= PHP_EOL . $separator;
            }
        }
        $return .= PHP_EOL;

        if (!empty($this->_headers)) {
            $return = $this->_getHeaderLine() . PHP_EOL . $return;
        }

        return $return;
    }
function _buildTable() {
        if (!count($this->_data)) {
            return '';
        }

        $vertical = $this->_border['vertical'];
        $separator = $this->_getSeparator();

        $return = array();
        for ($i = 0; $i < count($this->_data); $i++) {
            for ($j = 0; $j < count($this->_data[$i]); $j++) {
                if ($this->_data[$i] !== self::CONSOLE_TABLE_HORIZONTAL_RULE &&
                    $this->_strlen($this->_data[$i][$j]) <
                    $this->_cell_lengths[$j]
                ) {
                    $this->_data[$i][$j] = $this->_strpad($this->_data[$i][$j],
                        $this->_cell_lengths[$j],
                        ' ',
                        $this->_col_align[$j]);
                }
            }

            if ($this->_data[$i] !== self::CONSOLE_TABLE_HORIZONTAL_RULE) {
                $row_begin = $this->_borderVisibility['left']
                    ? $vertical . str_repeat(' ', $this->_padding)
                    : '';
                $row_end = $this->_borderVisibility['right']
                    ? str_repeat(' ', $this->_padding) . $vertical
                    : '';
                $implode_char = str_repeat(' ', $this->_padding) . $vertical
                    . str_repeat(' ', $this->_padding);
                $return[] = $row_begin
                    . implode($implode_char, $this->_data[$i]) . $row_end;
            } elseif (!empty($separator)) {
                $return[] = $separator;
            }

        }

        $return = implode(PHP_EOL, $return);
        if (!empty($separator)) {
            if ($this->_borderVisibility['inner']) {
                $return = $separator . PHP_EOL . $return;
            }
            if ($this->_borderVisibility['bottom']) {
                $return .= PHP_EOL . $separator;
            }
        }
        $return .= PHP_EOL;

        if (!empty($this->_headers)) {
            $return = $this->_getHeaderLine() . PHP_EOL . $return;
        }

        return $return;
    }
function _buildTable ( ) { if ( ! count ( $ this -> _data ) ) { return '' ; } $ vertical = $ this -> _border [ 'vertical' ] ; $ separator = $ this -> _getSeparator ( ) ; $ return = array ( ) ; for ( $ i = 0 ; $ i < count ( $ this -> _data ) ; $ i ++ ) { for ( $ j = 0 ; $ j < count ( $ this -> _data [ $ i ] ) ; $ j ++ ) { if ( $ this -> _data [ $ i ] !== self :: CONSOLE_TABLE_HORIZONTAL_RULE && $ this -> _strlen ( $ this -> _data [ $ i ] [ $ j ] ) < $ this -> _cell_lengths [ $ j ] ) { $ this -> _data [ $ i ] [ $ j ] = $ this -> _strpad ( $ this -> _data [ $ i ] [ $ j ] , $ this -> _cell_lengths [ $ j ] , ' ' , $ this -> _col_align [ $ j ] ) ; } } if ( $ this -> _data [ $ i ] !== self :: CONSOLE_TABLE_HORIZONTAL_RULE ) { $ row_begin = $ this -> _borderVisibility [ 'left' ] ? $ vertical . str_repeat ( ' ' , $ this -> _padding ) : '' ; $ row_end = $ this -> _borderVisibility [ 'right' ] ? str_repeat ( ' ' , $ this -> _padding ) . $ vertical : '' ; $ implode_char = str_repeat ( ' ' , $ this -> _padding ) . $ vertical . str_repeat ( ' ' , $ this -> _padding ) ; $ return [ ] = $ row_begin . implode ( $ implode_char , $ this -> _data [ $ i ] ) . $ row_end ; } elseif ( ! empty ( $ separator ) ) { $ return [ ] = $ separator ; } } $ return = implode ( PHP_EOL , $ return ) ; if ( ! empty ( $ separator ) ) { if ( $ this -> _borderVisibility [ 'inner' ] ) { $ return = $ separator . PHP_EOL . $ return ; } if ( $ this -> _borderVisibility [ 'bottom' ] ) { $ return .= PHP_EOL . $ separator ; } } $ return .= PHP_EOL ; if ( ! empty ( $ this -> _headers ) ) { $ return = $ this -> _getHeaderLine ( ) . PHP_EOL . $ return ; } return $ return ; }
Builds the table.

@return string  The generated table string.
Builds the table .