PHP Class Sonata\Exporter\Writer\CsvWriter

Author: Thomas Rabaix ([email protected])
Inheritance: implements Sonata\Exporter\Writer\TypedWriterInterface
Show file Open project: sonata-project/exporter Class Usage Examples

Protected Properties

Property Type Description
$delimiter string
$enclosure string
$escape string
$file resource
$filename string
$position integer
$showHeaders boolean
$withBom boolean

Public Methods

Method Description
__construct ( string $filename, string $delimiter = ',', string $enclosure = '"', string $escape = '\', boolean $showHeaders = true, boolean $withBom = false )
close ( )
getDefaultMimeType ( )
getFormat ( )
open ( )
write ( array $data )

Protected Methods

Method Description
addHeaders ( array $data )

Method Details

__construct() public method

public __construct ( string $filename, string $delimiter = ',', string $enclosure = '"', string $escape = '\', boolean $showHeaders = true, boolean $withBom = false )
$filename string
$delimiter string
$enclosure string
$escape string
$showHeaders boolean
$withBom boolean

addHeaders() protected method

protected addHeaders ( array $data )
$data array

close() public method

public close ( )

getDefaultMimeType() final public method

final public getDefaultMimeType ( )

getFormat() final public method

final public getFormat ( )

open() public method

public open ( )

write() public method

public write ( array $data )
$data array

Property Details

$delimiter protected property

protected string $delimiter
return string

$enclosure protected property

protected string $enclosure
return string

$escape protected property

protected string $escape
return string

$file protected property

protected resource $file
return resource

$filename protected property

protected string $filename
return string

$position protected property

protected int $position
return integer

$showHeaders protected property

protected bool $showHeaders
return boolean

$withBom protected property

protected bool $withBom
return boolean