PHP Class Browscap\Writer\CsvWriter

Author: Thomas Müller ([email protected])
Inheritance: implements Browscap\Writer\WriterInterface
Exibir arquivo Open project: browscap/browscap Class Usage Examples

Public Methods

Method Description
__construct ( string $file )
close ( ) : Browscap\Writer\WriterInterface closes the Writer and the written File
fileEnd ( ) : Browscap\Writer\WriterInterface Generates a end sequence for the output file
fileStart ( ) : Browscap\Writer\WriterInterface Generates a start sequence for the output file
getFilter ( ) : Browscap\Filter\FilterInterface
getFormatter ( ) : Browscap\Formatter\FormatterInterface
getLogger ( ) : Psr\Log\LoggerInterface
getType ( ) : string returns the Type of the writer
isSilent ( ) : boolean
renderAllDivisionsFooter ( ) : Browscap\Writer\WriterInterface renders the footer for all divisions
renderAllDivisionsHeader ( DataCollection $collection ) : Browscap\Writer\WriterInterface renders the header for all divisions
renderDivisionFooter ( ) : Browscap\Writer\WriterInterface renders the footer for a division
renderDivisionHeader ( string $division, string $parent = 'DefaultProperties' ) : Browscap\Writer\WriterInterface renders the header for a division
renderHeader ( array $comments = [] ) : Browscap\Writer\WriterInterface Generate the header
renderSectionBody ( array $section, DataCollection $collection, array $sections = [], string $sectionName = '' ) : CsvWriter renders all found useragents into a string
renderSectionFooter ( string $sectionName = '' ) : Browscap\Writer\WriterInterface renders the footer for a section
renderSectionHeader ( string $sectionName ) : Browscap\Writer\WriterInterface renders the header for a section
renderVersion ( array $versionData = [] ) : Browscap\Writer\WriterInterface renders the version information
setFilter ( Browscap\Filter\FilterInterface $filter ) : Browscap\Writer\WriterInterface
setFormatter ( Browscap\Formatter\FormatterInterface $formatter ) : Browscap\Writer\WriterInterface
setLogger ( Psr\Log\LoggerInterface $logger ) : Browscap\Writer\WriterInterface
setSilent ( boolean $silent ) : Browscap\Writer\WriterInterface

Private Methods

Method Description
detectMasterParent ( string $key, array $properties ) : string

Method Details

__construct() public method

public __construct ( string $file )
$file string

close() public method

closes the Writer and the written File
public close ( ) : Browscap\Writer\WriterInterface
return Browscap\Writer\WriterInterface

fileEnd() public method

Generates a end sequence for the output file
public fileEnd ( ) : Browscap\Writer\WriterInterface
return Browscap\Writer\WriterInterface

fileStart() public method

Generates a start sequence for the output file
public fileStart ( ) : Browscap\Writer\WriterInterface
return Browscap\Writer\WriterInterface

getFilter() public method

public getFilter ( ) : Browscap\Filter\FilterInterface
return Browscap\Filter\FilterInterface

getFormatter() public method

public getFormatter ( ) : Browscap\Formatter\FormatterInterface
return Browscap\Formatter\FormatterInterface

getLogger() public method

public getLogger ( ) : Psr\Log\LoggerInterface
return Psr\Log\LoggerInterface

getType() public method

returns the Type of the writer
public getType ( ) : string
return string

isSilent() public method

public isSilent ( ) : boolean
return boolean

renderAllDivisionsFooter() public method

renders the footer for all divisions
public renderAllDivisionsFooter ( ) : Browscap\Writer\WriterInterface
return Browscap\Writer\WriterInterface

renderAllDivisionsHeader() public method

renders the header for all divisions
public renderAllDivisionsHeader ( DataCollection $collection ) : Browscap\Writer\WriterInterface
$collection Browscap\Data\DataCollection
return Browscap\Writer\WriterInterface

renderDivisionFooter() public method

renders the footer for a division
public renderDivisionFooter ( ) : Browscap\Writer\WriterInterface
return Browscap\Writer\WriterInterface

renderDivisionHeader() public method

renders the header for a division
public renderDivisionHeader ( string $division, string $parent = 'DefaultProperties' ) : Browscap\Writer\WriterInterface
$division string
$parent string
return Browscap\Writer\WriterInterface

renderHeader() public method

Generate the header
public renderHeader ( array $comments = [] ) : Browscap\Writer\WriterInterface
$comments array
return Browscap\Writer\WriterInterface

renderSectionBody() public method

renders all found useragents into a string
public renderSectionBody ( array $section, DataCollection $collection, array $sections = [], string $sectionName = '' ) : CsvWriter
$section array
$collection Browscap\Data\DataCollection
$sections array
$sectionName string
return CsvWriter

renderSectionFooter() public method

renders the footer for a section
public renderSectionFooter ( string $sectionName = '' ) : Browscap\Writer\WriterInterface
$sectionName string
return Browscap\Writer\WriterInterface

renderSectionHeader() public method

renders the header for a section
public renderSectionHeader ( string $sectionName ) : Browscap\Writer\WriterInterface
$sectionName string
return Browscap\Writer\WriterInterface

renderVersion() public method

renders the version information
public renderVersion ( array $versionData = [] ) : Browscap\Writer\WriterInterface
$versionData array
return Browscap\Writer\WriterInterface

setFilter() public method

public setFilter ( Browscap\Filter\FilterInterface $filter ) : Browscap\Writer\WriterInterface
$filter Browscap\Filter\FilterInterface
return Browscap\Writer\WriterInterface

setFormatter() public method

public setFormatter ( Browscap\Formatter\FormatterInterface $formatter ) : Browscap\Writer\WriterInterface
$formatter Browscap\Formatter\FormatterInterface
return Browscap\Writer\WriterInterface

setLogger() public method

public setLogger ( Psr\Log\LoggerInterface $logger ) : Browscap\Writer\WriterInterface
$logger Psr\Log\LoggerInterface
return Browscap\Writer\WriterInterface

setSilent() public method

public setSilent ( boolean $silent ) : Browscap\Writer\WriterInterface
$silent boolean
return Browscap\Writer\WriterInterface