PHP 클래스 PHPUnit_Extensions_Database_DataSet_CsvDataSet, qcodo

You can incrementally add CSV files as tables to your datasets
저자: Mike Lively ([email protected])
상속: extends PHPUnit_Extensions_Database_DataSet_AbstractDataSet
파일 보기 프로젝트 열기: qcodo/qcodo 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$delimiter string
$enclosure string
$escape string
$tables array

공개 메소드들

메소드 설명
__construct ( string $delimiter = ',', string $enclosure = '"', string $escape = '"' ) Creates a new CSV dataset
addTable ( string $tableName, string $csvFile ) Adds a table to the dataset

보호된 메소드들

메소드 설명
createIterator ( boolean $reverse = FALSE ) : PHPUnit_Extensions_Database_DataSet_ITableIterator Creates an iterator over the tables in the data set. If $reverse is true a reverse iterator will be returned.
getCsvRow ( resource $fh ) : array Returns a row from the csv file in an indexed array.

메소드 상세

__construct() 공개 메소드

You can pass in the parameters for how csv files will be read.
public __construct ( string $delimiter = ',', string $enclosure = '"', string $escape = '"' )
$delimiter string
$enclosure string
$escape string

addTable() 공개 메소드

The table will be given the passed name. $csvFile should be a path to a valid csv file (based on the arguments passed to the constructor.)
public addTable ( string $tableName, string $csvFile )
$tableName string
$csvFile string

createIterator() 보호된 메소드

Creates an iterator over the tables in the data set. If $reverse is true a reverse iterator will be returned.
protected createIterator ( boolean $reverse = FALSE ) : PHPUnit_Extensions_Database_DataSet_ITableIterator
$reverse boolean
리턴 PHPUnit_Extensions_Database_DataSet_ITableIterator

getCsvRow() 보호된 메소드

Returns a row from the csv file in an indexed array.
protected getCsvRow ( resource $fh ) : array
$fh resource
리턴 array

프로퍼티 상세

$delimiter 보호되어 있는 프로퍼티

protected string $delimiter
리턴 string

$enclosure 보호되어 있는 프로퍼티

protected string $enclosure
리턴 string

$escape 보호되어 있는 프로퍼티

protected string $escape
리턴 string

$tables 보호되어 있는 프로퍼티

protected array $tables
리턴 array