PHP Class Browscap\Writer\CsvWriter

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

Méthodes publiques

Méthode 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

Méthode Description
detectMasterParent ( string $key, array $properties ) : string

Method Details

__construct() public méthode

public __construct ( string $file )
$file string

close() public méthode

closes the Writer and the written File
public close ( ) : Browscap\Writer\WriterInterface
Résultat Browscap\Writer\WriterInterface

fileEnd() public méthode

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

fileStart() public méthode

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

getFilter() public méthode

public getFilter ( ) : Browscap\Filter\FilterInterface
Résultat Browscap\Filter\FilterInterface

getFormatter() public méthode

public getFormatter ( ) : Browscap\Formatter\FormatterInterface
Résultat Browscap\Formatter\FormatterInterface

getLogger() public méthode

public getLogger ( ) : Psr\Log\LoggerInterface
Résultat Psr\Log\LoggerInterface

getType() public méthode

returns the Type of the writer
public getType ( ) : string
Résultat string

isSilent() public méthode

public isSilent ( ) : boolean
Résultat boolean

renderAllDivisionsFooter() public méthode

renders the footer for all divisions
public renderAllDivisionsFooter ( ) : Browscap\Writer\WriterInterface
Résultat Browscap\Writer\WriterInterface

renderAllDivisionsHeader() public méthode

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

renderDivisionFooter() public méthode

renders the footer for a division
public renderDivisionFooter ( ) : Browscap\Writer\WriterInterface
Résultat Browscap\Writer\WriterInterface

renderDivisionHeader() public méthode

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

renderHeader() public méthode

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

renderSectionBody() public méthode

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
Résultat CsvWriter

renderSectionFooter() public méthode

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

renderSectionHeader() public méthode

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

renderVersion() public méthode

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

setFilter() public méthode

public setFilter ( Browscap\Filter\FilterInterface $filter ) : Browscap\Writer\WriterInterface
$filter Browscap\Filter\FilterInterface
Résultat Browscap\Writer\WriterInterface

setFormatter() public méthode

public setFormatter ( Browscap\Formatter\FormatterInterface $formatter ) : Browscap\Writer\WriterInterface
$formatter Browscap\Formatter\FormatterInterface
Résultat Browscap\Writer\WriterInterface

setLogger() public méthode

public setLogger ( Psr\Log\LoggerInterface $logger ) : Browscap\Writer\WriterInterface
$logger Psr\Log\LoggerInterface
Résultat Browscap\Writer\WriterInterface

setSilent() public méthode

public setSilent ( boolean $silent ) : Browscap\Writer\WriterInterface
$silent boolean
Résultat Browscap\Writer\WriterInterface