function _updateRowsCols($rowdata = null) {
        // Update maximum columns.
        $this->_max_cols = max($this->_max_cols, count($rowdata));

        // Update maximum rows.
        ksort($this->_data);
        $keys = array_keys($this->_data);
        $this->_max_rows = end($keys) + 1;

        switch ($this->_defaultAlign) {
            case self::CONSOLE_TABLE_ALIGN_CENTER:
                $pad = STR_PAD_BOTH;
                break;
            case self::CONSOLE_TABLE_ALIGN_RIGHT:
                $pad = STR_PAD_LEFT;
                break;
            default:
                $pad = STR_PAD_RIGHT;
                break;
        }

        // Set default column alignments
        for ($i = 0; $i < $this->_max_cols; $i++) {
            if (!isset($this->_col_align[$i])) {
                $this->_col_align[$i] = $pad;
            }
        }
    }
function _updateRowsCols($rowdata = null) {
        // Update maximum columns.
        $this->_max_cols = max($this->_max_cols, count($rowdata));

        // Update maximum rows.
        ksort($this->_data);
        $keys = array_keys($this->_data);
        $this->_max_rows = end($keys) + 1;

        switch ($this->_defaultAlign) {
            case self::CONSOLE_TABLE_ALIGN_CENTER:
                $pad = STR_PAD_BOTH;
                break;
            case self::CONSOLE_TABLE_ALIGN_RIGHT:
                $pad = STR_PAD_LEFT;
                break;
            default:
                $pad = STR_PAD_RIGHT;
                break;
        }

        // Set default column alignments
        for ($i = 0; $i < $this->_max_cols; $i++) {
            if (!isset($this->_col_align[$i])) {
                $this->_col_align[$i] = $pad;
            }
        }
    }
function _updateRowsCols ( $ rowdata = null ) { // Update maximum columns. $ this -> _max_cols = max ( $ this -> _max_cols , count ( $ rowdata ) ) ; // Update maximum rows. ksort ( $ this -> _data ) ; $ keys = array_keys ( $ this -> _data ) ; $ this -> _max_rows = end ( $ keys ) + 1 ; switch ( $ this -> _defaultAlign ) { case self :: CONSOLE_TABLE_ALIGN_CENTER : $ pad = STR_PAD_BOTH ; break ; case self :: CONSOLE_TABLE_ALIGN_RIGHT : $ pad = STR_PAD_LEFT ; break ; default : $ pad = STR_PAD_RIGHT ; break ; } // Set default column alignments for ( $ i = 0 ; $ i < $ this -> _max_cols ; $ i ++ ) { if ( ! isset ( $ this -> _col_align [ $ i ] ) ) { $ this -> _col_align [ $ i ] = $ pad ; } } }
Updates values for maximum columns and rows.

@param array $rowdata Data array of a single row.

@return void
Updates values for maximum columns and rows .