private function AddFields($columnsMetadata) {
        //Write the protected fields
        $output = $this->_TAB2 . "protected " . $this->_LF;
        $columnCount = 0;
        foreach ($columnsMetadata as $columnName => $columnMetadata) {
            if (count($columnsMetadata) - 1 === $columnCount) {
                $output .= $this->_TAB4 . "$" . $columnMetadata["Field"] . ";" . $this->_CRLF;
            } else {
                $output .= $this->_TAB4 . "$" . $columnMetadata["Field"] . "," . $this->_LF;
            }
            $columnCount += 1;
        }
        fwrite($this->writer, $output);
    }