PHP Class LazyRecord\Exporter\CSVExporter

Show file Open project: corneltek/lazyrecord Class Usage Examples

Protected Properties

Property Type Description
$delimiter
$enclosure default to ',';
$escapeChar default to '"'
$fd

Public Methods

Method Description
__construct ( $fd, $delimiter = ',', $enclosure = '"', $escapeChar = '\' ) default to "\";
exportCollection ( BaseCollection $collection, array $intersectKeys = null ) Export collection object into CSV file.
exportQuery ( PDOStatement $stm, array $intersectKeys = null )
setDelimiter ( $delimiter )
setEnclosure ( $enclosure )
setEscapeChar ( $char )

Method Details

__construct() public method

default to "\";
public __construct ( $fd, $delimiter = ',', $enclosure = '"', $escapeChar = '\' )

exportCollection() public method

int fputcsv ( resource $handle , array $fields [, string $delimiter = "," [, string $enclosure = '"' [, string $escape_char = "\" ]]] )
public exportCollection ( BaseCollection $collection, array $intersectKeys = null )
$collection LazyRecord\BaseCollection
$intersectKeys array

exportQuery() public method

public exportQuery ( PDOStatement $stm, array $intersectKeys = null )
$stm PDOStatement
$intersectKeys array

setDelimiter() public method

public setDelimiter ( $delimiter )

setEnclosure() public method

public setEnclosure ( $enclosure )

setEscapeChar() public method

public setEscapeChar ( $char )

Property Details

$delimiter protected property

protected $delimiter

$enclosure protected property

default to ',';
protected $enclosure

$escapeChar protected property

default to '"'
protected $escapeChar

$fd protected property

protected $fd