New Class
\Bakame\Csv\Writer
to help creating and updating CSV file.
New Abstract
\Bakame\Csv\AbstractCsv
abstract class is the new parent for:
- the
\Bakame\Csv\Reader
- the
\Bakame\Csv\Writer
This class implements the IteratorAggregate
and the JsonSerializable
interfaces and has a __toString
method. (see the README file to have a complete list of methods shared between \Bakame\Csv\Reader
and \Bakame\Csv\Writer
).
New Trait
\Bakame\Csv\Traits\IteratorQuery
is used in \Bakame\Csv\Reader
to enable CSV filtering.
New Methods
- the
\Bakame\Csv\Writer::insertOne
to insert one line into a CSV. - the
\Bakame\Csv\Writer::insertAll
to insert many lines into a CSV.
Changed Methods:
\Bakame\Csv\Reader::fetchCol
no longer accept a third option$strict
\Bakame\Csv\Reader::fetchOne
to read a single line of the CSV.(this method was deprecated in version 3.2.0 . But it is no longer deprecated and comes with a better implementation)
Removed Interface
\Bakame\Csv\ReaderInterface
Remove Class
\Bakame\Csv\Codec
Remove Traits
\Bakame\Csv\Traits\CsvControls
(now this is done by\Bakame\Csv\AbstractCsv
)\Bakame\Csv\Traits\CsvOutput
(now this is done by\Bakame\Csv\AbstractCsv
)
Remove methods
\Bakame\Csv\Reader
no longer implements theArrayAccess
interface\Bakame\Csv\Reader::getFile
\Bakame\Csv\Reader::fetchValue
The library comes bundle with examples to help the developer see the classes in action.