PHP Class EasyCSV\Reader

Inheritance: extends AbstractBase
ファイルを表示 Open project: jwage/easy-csv Class Usage Examples

Public Methods

Method Description
__construct ( $path, string $mode = 'r+', boolean $headersInFirstRow = true )
advanceTo ( $lineNumber )
getAll ( ) : array
getCurrentRow ( ) : array
getHeaders ( ) : boolean
getLastLineNumber ( ) : integer
getLineNumber ( ) : integer
getRow ( ) : array | boolean
isEof ( ) : boolean
setHeaderLine ( $lineNumber )

Protected Methods

Method Description
init ( )
rowIsEmpty ( $row ) : boolean

Method Details

__construct() public method

public __construct ( $path, string $mode = 'r+', boolean $headersInFirstRow = true )
$path
$mode string
$headersInFirstRow boolean

advanceTo() public method

public advanceTo ( $lineNumber )
$lineNumber zero-based index

getAll() public method

public getAll ( ) : array
return array

getCurrentRow() public method

public getCurrentRow ( ) : array
return array

getHeaders() public method

public getHeaders ( ) : boolean
return boolean

getLastLineNumber() public method

public getLastLineNumber ( ) : integer
return integer zero-based index

getLineNumber() public method

public getLineNumber ( ) : integer
return integer zero-based index

getRow() public method

public getRow ( ) : array | boolean
return array | boolean

init() protected method

protected init ( )

isEof() public method

public isEof ( ) : boolean
return boolean

rowIsEmpty() protected method

protected rowIsEmpty ( $row ) : boolean
$row
return boolean

setHeaderLine() public method

public setHeaderLine ( $lineNumber )
$lineNumber zero-based index