PHP Class Sonata\Exporter\Writer\XmlExcelWriter

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

Protected Properties

Property Type Description
$columnsType mixed | null
$file resource | null
$filename string | null
$footer
$header string
$position integer
$showHeaders boolean

Public Methods

Method Description
__construct ( string $filename, boolean $showHeaders = true, mixed $columnsType = null )
close ( )
open ( )
write ( array $data )

Private Methods

Method Description
getDataType ( string $key, string $value ) : string
getXmlString ( array $fields = [] ) : string Prepare and return XML string for MS Excel XML from array.

Method Details

__construct() public method

public __construct ( string $filename, boolean $showHeaders = true, mixed $columnsType = null )
$filename string
$showHeaders boolean
$columnsType mixed Define cells type to use If string: force all cells to the given type. e.g: 'Number' If array: force only given cells. e.g: array('ean'=>'String', 'price'=>'Number') If null: will guess the type. 'Number' if value is numeric, 'String' otherwise

close() public method

public close ( )

open() public method

public open ( )

write() public method

public write ( array $data )
$data array

Property Details

$columnsType protected property

protected mixed|null $columnsType
return mixed | null

$file protected property

protected resource|null $file
return resource | null

$filename protected property

protected string|null $filename
return string | null

$header protected property

protected string $header
return string

$position protected property

protected int $position
return integer

$showHeaders protected property

protected bool $showHeaders
return boolean