Class CSV

Description

Simple object to aid in creating CSV documents

Located in /class.csv.php (line 22)


                
			
Variable Summary
mixed $aData
mixed $aHeaders
Method Summary
void AddData (array $aData)
void AddHeader (string $sHeader)
void AddHeaders (array $aHeaders)
string __toString ()
Variables
mixed $aData = array() (line 32)

The data of the csv document

  • access: public
mixed $aHeaders = array() (line 27)

The headers of the csv document

  • access: public
Methods
AddData (line 72)

Adds the supplied array of data to the CSV document. If the number of columns in the data does not match the number of columns in the headers (unless there are no headers), this method will throw an exception.

  • access: public
void AddData (array $aData)
  • array $aData: An array of CSV row data
AddHeader (line 41)

Adds a header to the list of CSV column headers. This method appends to the current list of headers by adding the single header.

  • access: public
void AddHeader (string $sHeader)
  • string $sHeader: The name of the header to add to the list of column headers
AddHeaders (line 55)

Adds an array of headers to the list of CSV column headers. This method appends to the current list of headers by adding the passed array of headers to the existing array of headers already added.

  • access: public
void AddHeaders (array $aHeaders)
  • array $aHeaders: An array of headers to append to the current array of headers
__toString (line 91)

This method takes the headers and data stored in this object and creates a CSV document from that data.

  • return: The headers and data supplied as a string formatted as a CSV document
  • access: public
string __toString ()

Documentation generated on Thu, 25 Feb 2010 15:59:40 -0500 by phpDocumentor 1.4.3