protected function formatRow($row)
    {
        foreach ($row as &$column) {
            if (!is_scalar($column)) {
                $column = $this->serialize($column);
            }
            switch ($this->quoting) {
                case self::QUOTE_NONE:
                    // do nothing... no quoting is happening here
                    break;
                case self::QUOTE_ALL:
                    $column = $this->quote($this->escape($column));
                    break;
                case self::QUOTE_NONNUMERIC:
                    if (preg_match("/[^0-9]/", $column)) {
                        $column = $this->quote($this->escape($column));
                    }
                    break;
                case self::QUOTE_MINIMAL:
                default:
                    if ($this->containsSpecialChars($column)) {
                        $column = $this->quote($this->escape($column));
                    }
                    break;
            }
        }

        return $row;
    }
protected function formatRow($row)
    {
        foreach ($row as &$column) {
            if (!is_scalar($column)) {
                $column = $this->serialize($column);
            }
            switch ($this->quoting) {
                case self::QUOTE_NONE:
                    // do nothing... no quoting is happening here
                    break;
                case self::QUOTE_ALL:
                    $column = $this->quote($this->escape($column));
                    break;
                case self::QUOTE_NONNUMERIC:
                    if (preg_match("/[^0-9]/", $column)) {
                        $column = $this->quote($this->escape($column));
                    }
                    break;
                case self::QUOTE_MINIMAL:
                default:
                    if ($this->containsSpecialChars($column)) {
                        $column = $this->quote($this->escape($column));
                    }
                    break;
            }
        }

        return $row;
    }
protected function formatRow ( $ row ) { foreach ( $ row as & $ column ) { if ( ! is_scalar ( $ column ) ) { $ column = $ this -> serialize ( $ column ) ; } switch ( $ this -> quoting ) { case self :: QUOTE_NONE : // do nothing... no quoting is happening here break ; case self :: QUOTE_ALL : $ column = $ this -> quote ( $ this -> escape ( $ column ) ) ; break ; case self :: QUOTE_NONNUMERIC : if ( preg_match ( "/[^0-9]/" , $ column ) ) { $ column = $ this -> quote ( $ this -> escape ( $ column ) ) ; } break ; case self :: QUOTE_MINIMAL : default : if ( $ this -> containsSpecialChars ( $ column ) ) { $ column = $ this -> quote ( $ this -> escape ( $ column ) ) ; } break ; } } return $ row ; }
Accepts a row of data and returns it formatted

@param array $row An array of data to be formatted for output to the file

@return array The formatted array
Accepts a row of data and returns it formatted