PHP Class Browscap\Writer\WriterCollection

Author: Thomas Müller ([email protected])
Show file Open project: browscap/browscap Class Usage Examples

Public Methods

Method Description
addWriter ( Browscap\Writer\WriterInterface $writer ) : WriterCollection add a new writer to the collection
close ( ) : WriterCollection closes the Writer and the written File
fileEnd ( ) : WriterCollection Generates a end sequence for the output file
fileStart ( ) : WriterCollection Generates a start sequence for the output file
renderAllDivisionsFooter ( ) : WriterCollection renders the footer for all divisions
renderAllDivisionsHeader ( DataCollection $collection ) : WriterCollection renders the header for all divisions
renderDivisionFooter ( ) : WriterCollection renders the footer for a division
renderDivisionHeader ( string $division, string $parent = 'DefaultProperties' ) : WriterCollection renders the header for a division
renderHeader ( array $comments = [] ) : WriterCollection Generate the header
renderSectionBody ( array $section, DataCollection $collection, array $sections = [], string $sectionName = '' ) : WriterCollection renders all found useragents into a string
renderSectionFooter ( string $sectionName = '' ) : WriterCollection renders the footer for a section
renderSectionHeader ( string $sectionName ) : WriterCollection renders the header for a section
renderVersion ( string $version, DataCollection $collection ) : WriterCollection renders the version information
setExpander ( Expander $expander ) : Browscap\Writer\WriterInterface
setSilent ( Division $division ) : WriterCollection
setSilentSection ( mixed $section ) : WriterCollection

Method Details

addWriter() public method

add a new writer to the collection
public addWriter ( Browscap\Writer\WriterInterface $writer ) : WriterCollection
$writer Browscap\Writer\WriterInterface
return WriterCollection

close() public method

closes the Writer and the written File
public close ( ) : WriterCollection
return WriterCollection

fileEnd() public method

Generates a end sequence for the output file
public fileEnd ( ) : WriterCollection
return WriterCollection

fileStart() public method

Generates a start sequence for the output file
public fileStart ( ) : WriterCollection
return WriterCollection

renderAllDivisionsFooter() public method

renders the footer for all divisions
public renderAllDivisionsFooter ( ) : WriterCollection
return WriterCollection

renderAllDivisionsHeader() public method

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

renderDivisionFooter() public method

renders the footer for a division
public renderDivisionFooter ( ) : WriterCollection
return WriterCollection

renderDivisionHeader() public method

renders the header for a division
public renderDivisionHeader ( string $division, string $parent = 'DefaultProperties' ) : WriterCollection
$division string
$parent string
return WriterCollection

renderHeader() public method

Generate the header
public renderHeader ( array $comments = [] ) : WriterCollection
$comments array
return WriterCollection

renderSectionBody() public method

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

renderSectionFooter() public method

renders the footer for a section
public renderSectionFooter ( string $sectionName = '' ) : WriterCollection
$sectionName string
return WriterCollection

renderSectionHeader() public method

renders the header for a section
public renderSectionHeader ( string $sectionName ) : WriterCollection
$sectionName string
return WriterCollection

renderVersion() public method

renders the version information
public renderVersion ( string $version, DataCollection $collection ) : WriterCollection
$version string
$collection Browscap\Data\DataCollection
return WriterCollection

setExpander() public method

public setExpander ( Expander $expander ) : Browscap\Writer\WriterInterface
$expander Browscap\Data\Expander
return Browscap\Writer\WriterInterface

setSilent() public method

public setSilent ( Division $division ) : WriterCollection
$division Browscap\Data\Division
return WriterCollection

setSilentSection() public method

public setSilentSection ( mixed $section ) : WriterCollection
$section mixed
return WriterCollection