PHP Class SimpleExcel\Writer\BaseWriter

Author: Faisalman
Inheritance: implements SimpleExcel\Writer\IWriter
Show file Open project: faisalman/simple-excel-php

Protected Properties

Property Type Description
$content_type string Defines content-type for HTTP header
$file_extension string Defines file extension to be used when saving file
$tabl_data array Holds tabular data

Public Methods

Method Description
__construct ( ) : void
addRow ( array $values, $end = TRUE ) : void Adding row data to table
saveFile ( string $filename, string $target = NULL ) : void Export the document
saveString ( ) : string Get document content as string
setData ( array $values ) : void Set tabular data

Method Details

__construct() public method

public __construct ( ) : void
return void

addRow() public method

Adding row data to table
public addRow ( array $values, $end = TRUE ) : void
$values array An array contains ordered value for every cell
return void

saveFile() public method

Export the document
public saveFile ( string $filename, string $target = NULL ) : void
$filename string Name for the saved file (extension will be set automatically)
$target string Save location
return void

saveString() public method

Get document content as string
public saveString ( ) : string
return string Content of document

setData() public method

Set tabular data
public setData ( array $values ) : void
$values array An array contains ordered value of arrays for all fields
return void

Property Details

$content_type protected property

Defines content-type for HTTP header
protected string $content_type
return string

$file_extension protected property

Defines file extension to be used when saving file
protected string $file_extension
return string

$tabl_data protected property

Holds tabular data
protected array $tabl_data
return array