protected function addRFC4180CompliantRecord(array $record)
    {
        foreach ($record as &$field) {
            $field = (string) $field;
            if (preg_match($this->rfc4180_regexp, $field)) {
                $field = $this->enclosure.str_replace($this->enclosure, $this->rfc4180_enclosure, $field).$this->enclosure;
            }
        }
        unset($field);

        return $this->document->fwrite(implode($this->delimiter, $record)."\n");
    }