nozavroni / csvelte

🕺🏻 CSV and Tabular Data library for PHP
http://phpcsv.com/
Other
6 stars 0 forks source link

ReadTheDocs updates for v0.2 #87

Closed nozavroni closed 7 years ago

nozavroni commented 8 years ago

Updates for v0.2

All the changes I've made for v0.2 need to be documented and/or the documentation needs to be updated. There are also a few features/concepts that were included in v0.1 that just never got documented. Finally, the section called "tutorials" still says coming soon, so if you have time to dump even a single tutorial in there, it would look a million times better.

After you fix the lickHeader method (make it use the sample data passed to taster's constructor) add this section back to the taster reference guide.

Analyzing data for header row
=============================

CSV files often use the first row of their dataset as a list of human-readable column names called a header row. The ``CSVelte\Taster`` object can *usually* determine whether a dataset contains a header row but just as with the Flavor detection, it can only guess. If it fails, it issues a similar exception to the one(s) issued by the ``CSVelte\Taster::lick()`` method.

.. code-block:: php 

    <?php 
    try {
        $csv = new CSVelte\Input\File('./import/data.csv');
        $taster = new CSVelte\Taster($csv);
        if ($taster->lickHeader() {

        })
    } catch (CSVelte\Exception\TasterException $e) {

    }
nozavroni commented 7 years ago

I'm going to just call this finished. The docs are a living document they will round out organically.