OOP

A class used to read CSV files


/**
 * CsvProcessor.
 * 
 * @author Dribbit info@dribbit.eu
 *
 */
class CsvProcessor {

  /**
   * Process csv files and return as an associated or indexed array
   * depending if headers are set.
   * 
   * @param $file
   *  String File path.
   * @param $length
   * Must be greater than the longest line (in characters) to be found in the CSV file (allowing for trailing line-end characters). 
   * By setting to 0, the maximum line length is not limited, which is slightly slower. 
   * @param $delimeter
   *  String containing the CSV delimeter.

A class used to read textfiles


/**
 * TextProcessor.
 * 
 * @author Dribbit info@dribbit.eu
 *
 */
class TextProcessor {

  /**
   * Process textfiles and return as an associated array.
   * 
   * @param $file
   *  String File path.
   * @param $length
   * Reading ends when length - 1 bytes have been read, on a newline (which is included in the return value), 
   * or on EOF (whichever comes first). If no length is specified, 
   * it will keep reading from the stream until it reaches the end of the line. 
   *  
   * @return array
   * 
   */
Subscribe to RSS - OOP