public function make()
    {
        // empty table to start
        $table = [];
        // get the max length of each column in the table
        $field_lengths = $this->maxMultidimensionalArrayStringSize($this->data);
        // get the length of a row by mocking up a row
        $row_length = $this->calculateRowLength($field_lengths, $this->seperator_padding, $this->seperator);
        // get the top and bottom of the table
        $book_end = $this->su->fill($row_length, $this->header_character);
        // get the row that appears below the header row to seperate it from the other rows
        $below_header = $this->su->fill($row_length, $this->below_header_character);
        // add the top $book_end
        $table[] = $book_end;
        // loop over each 'row' in our array
        for ($i = 0; $i < count($this->data); $i++) {
            // line starts as just the left most seperator
            $line = $this->seperator . $this->su->fill($this->seperator_padding);
            // loop over each 'field' aka column in our row
            for ($j = 0; $j < count($this->data[$i]); $j++) {
                // format the fields such that they have a max length of the biggest field in this column
                // and add the additional padding, then pass this to the formatter method and append it to
                // the line and then add the seperator
                $line .= $this->su->{$this->formatter}($this->data[$i][$j], $field_lengths[$j]) . $this->su->fill($this->seperator_padding) . $this->seperator . $this->su->fill($this->seperator_padding);
            }
            // add the new line to the table
            $table[] = $line;
            // if this was the first row we will add a $below_header row to break it up
            if ($i == 0) {
                $table[] = $below_header;
            }
        }
        // add the bottom book end to the table
        $table[] = $book_end;
        // set the table data on the instance
        $this->table = $table;
        return $this;
    }
public function make()
    {
        // empty table to start
        $table = [];
        // get the max length of each column in the table
        $field_lengths = $this->maxMultidimensionalArrayStringSize($this->data);
        // get the length of a row by mocking up a row
        $row_length = $this->calculateRowLength($field_lengths, $this->seperator_padding, $this->seperator);
        // get the top and bottom of the table
        $book_end = $this->su->fill($row_length, $this->header_character);
        // get the row that appears below the header row to seperate it from the other rows
        $below_header = $this->su->fill($row_length, $this->below_header_character);
        // add the top $book_end
        $table[] = $book_end;
        // loop over each 'row' in our array
        for ($i = 0; $i < count($this->data); $i++) {
            // line starts as just the left most seperator
            $line = $this->seperator . $this->su->fill($this->seperator_padding);
            // loop over each 'field' aka column in our row
            for ($j = 0; $j < count($this->data[$i]); $j++) {
                // format the fields such that they have a max length of the biggest field in this column
                // and add the additional padding, then pass this to the formatter method and append it to
                // the line and then add the seperator
                $line .= $this->su->{$this->formatter}($this->data[$i][$j], $field_lengths[$j]) . $this->su->fill($this->seperator_padding) . $this->seperator . $this->su->fill($this->seperator_padding);
            }
            // add the new line to the table
            $table[] = $line;
            // if this was the first row we will add a $below_header row to break it up
            if ($i == 0) {
                $table[] = $below_header;
            }
        }
        // add the bottom book end to the table
        $table[] = $book_end;
        // set the table data on the instance
        $this->table = $table;
        return $this;
    }
public function make ( ) { // empty table to start $ table = [ ] ; // get the max length of each column in the table $ field_lengths = $ this -> maxMultidimensionalArrayStringSize ( $ this -> data ) ; // get the length of a row by mocking up a row $ row_length = $ this -> calculateRowLength ( $ field_lengths , $ this -> seperator_padding , $ this -> seperator ) ; // get the top and bottom of the table $ book_end = $ this -> su -> fill ( $ row_length , $ this -> header_character ) ; // get the row that appears below the header row to seperate it from the other rows $ below_header = $ this -> su -> fill ( $ row_length , $ this -> below_header_character ) ; // add the top $book_end $ table [ ] = $ book_end ; // loop over each 'row' in our array for ( $ i = 0 ; $ i < count ( $ this -> data ) ; $ i ++ ) { // line starts as just the left most seperator $ line = $ this -> seperator . $ this -> su -> fill ( $ this -> seperator_padding ) ; // loop over each 'field' aka column in our row for ( $ j = 0 ; $ j < count ( $ this -> data [ $ i ] ) ; $ j ++ ) { // format the fields such that they have a max length of the biggest field in this column // and add the additional padding, then pass this to the formatter method and append it to // the line and then add the seperator $ line .= $ this -> su -> { $ this -> formatter } ( $ this -> data [ $ i ] [ $ j ] , $ field_lengths [ $ j ] ) . $ this -> su -> fill ( $ this -> seperator_padding ) . $ this -> seperator . $ this -> su -> fill ( $ this -> seperator_padding ) ; } // add the new line to the table $ table [ ] = $ line ; // if this was the first row we will add a $below_header row to break it up if ( $ i == 0 ) { $ table [ ] = $ below_header ; } } // add the bottom book end to the table $ table [ ] = $ book_end ; // set the table data on the instance $ this -> table = $ table ; return $ this ; }
Make a table based on the values assigned to the class via
methods.

@return $this
Make a table based on the values assigned to the class via methods .