Comments: on this page. Click to read or post your own.
Implements interfaces:
Class to handle parsing of CSV files, where the column headers are in the first row.
The idea is that you pass it another object to handle the actual procesing of the data in the CSV file.
Usage:
Located in /sapphire/dev/CSVParser.php (line 23)
Object | --CSVParser
Map of source columns to output columns
Once they get into this variable, all of the source columns are in lowercase
The data of the current row
The character for separating columns
The character for quoting colums
The header row used to map data in the CSV file
To begin with, this is null. Once it has been set, data will get returned from the CSV file
A custom header row provided by the caller
The current row number
Inherited from Object
Object::$builtInMethods
Object::$class
Object::$classConstructed
Object::$extensions
Object::$extension_instances
Object::$extraMethods
Object::$extraStatics
Object::$statics
Object::$static_cached
Open a CSV file for parsing.
You can use the object returned in a foreach loop to extract the data
Close the CSV file and re-set all of the internal variables
Get a header row from the CSV file
Get a row from the CSV file and update $this->currentRow;
Re-map columns in the CSV file.
This can be useful for identifying synonyms in the file For example:
Open the CSV file for reading
If your CSV file doesn't have a header row, then you can call this function to provide one.
If you call this function, then the first row of the CSV will be included in the data returned.
Map the contents of a header array using $this->mappedColumns
Inherited From Object
Object::__construct()
Object::addMethodsFrom()
Object::addStaticVars()
Object::addWrapperMethod()
Object::add_extension()
Object::allMethodNames()
Object::buildMethodList()
Object::cacheToFile()
Object::cacheToFileWithArgs()
Object::create()
Object::createMethod()
Object::defineMethods()
Object::exists()
Object::extend()
Object::extInstance()
Object::getCustomClass()
Object::hasExtension()
Object::hasMethod()
Object::invokeWithExtensions()
Object::is_a()
Object::loadCache()
Object::parentClass()
Object::sanitiseCachename()
Object::saveCache()
Object::set_stat()
Object::set_uninherited()
Object::stat()
Object::strong_create()
Object::uninherited()
Object::useCustomClass()
Object::__call()
Object::__toString()
Documentation generated on Sun, 19 Oct 2008 06:39:35 +1300 by phpDocumentor 1.3.2