PHP 클래스 Piwik\DataTable\Renderer\Csv

When rendered using the default settings, a CSV report has the following characteristics: The first record contains headers for all the columns in the report. All rows have the same number of columns. The default field delimiter string is a comma (,). Formatting and layout are ignored.
상속: extends Piwik\DataTable\Renderer
파일 보기 프로젝트 열기: piwik/piwik 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$convertToUnicode boolean Converts the content to unicode so that UTF8 characters (eg. chinese) can be imported in Excel
$exportIdSubtable boolean idSubtable will be exported in a column called 'idsubdatatable'
$exportMetadata boolean 'metadata' columns will be exported, prefixed by 'metadata_'
$lineEnd string Line end
$separator string Column separator

공개 메소드들

메소드 설명
render ( ) : string Computes the dataTable output and returns the string/binary
setConvertToUnicode ( $bool ) Enables / Disables unicode converting
setSeparator ( $separator ) Sets the column separator

보호된 메소드들

메소드 설명
formatFormulas ( $value )
formatValue ( mixed $value ) : string Formats/Escapes the given value
removeFirstPercentSign ( $value ) : mixed
renderDataTable ( DataTable | Piwik\DataTable\Simple $table, array &$allColumns = [] ) : string Converts the output of the given simple data table
renderDataTableMap ( Piwik\DataTable\Map $table, array &$allColumns = [] ) : string Computes the output of the given data table array
renderHeader ( ) Sends the http headers for csv file
renderTable ( DataTable | array $table, array &$allColumns = [] ) : string Computes the output of the given data table

비공개 메소드들

메소드 설명
buildCsvString ( $allColumns, $csv ) : array
convertToUnicode ( $str ) : string
flattenColumnArray ( $columns, &$csvRow = [], $csvColumnNameTemplate = '%s' ) Flattens an array of column values so they can be outputted as CSV (which does not support nested structures).
getCsvColumnName ( $name )
getHeaderLine ( array $columnMetrics ) : array Returns the CSV header line for a set of metrics. Will translate columns if desired.
makeArrayFromDataTable ( $table, &$allColumns ) : array

메소드 상세

formatFormulas() 보호된 메소드

protected formatFormulas ( $value )

formatValue() 보호된 메소드

Formats/Escapes the given value
protected formatValue ( mixed $value ) : string
$value mixed
리턴 string

removeFirstPercentSign() 보호된 메소드

protected removeFirstPercentSign ( $value ) : mixed
$value
리턴 mixed

render() 공개 메소드

Computes the dataTable output and returns the string/binary
public render ( ) : string
리턴 string

renderDataTable() 보호된 메소드

Converts the output of the given simple data table
protected renderDataTable ( DataTable | Piwik\DataTable\Simple $table, array &$allColumns = [] ) : string
$table Piwik\DataTable | Piwik\DataTable\Simple
$allColumns array
리턴 string

renderDataTableMap() 보호된 메소드

Computes the output of the given data table array
protected renderDataTableMap ( Piwik\DataTable\Map $table, array &$allColumns = [] ) : string
$table Piwik\DataTable\Map
$allColumns array
리턴 string

renderHeader() 보호된 메소드

Sends the http headers for csv file
protected renderHeader ( )

renderTable() 보호된 메소드

Computes the output of the given data table
protected renderTable ( DataTable | array $table, array &$allColumns = [] ) : string
$table Piwik\DataTable | array
$allColumns array
리턴 string

setConvertToUnicode() 공개 메소드

Enables / Disables unicode converting
public setConvertToUnicode ( $bool )
$bool

setSeparator() 공개 메소드

Sets the column separator
public setSeparator ( $separator )
$separator

프로퍼티 상세

$convertToUnicode 공개적으로 프로퍼티

Converts the content to unicode so that UTF8 characters (eg. chinese) can be imported in Excel
public bool $convertToUnicode
리턴 boolean

$exportIdSubtable 공개적으로 프로퍼티

idSubtable will be exported in a column called 'idsubdatatable'
public bool $exportIdSubtable
리턴 boolean

$exportMetadata 공개적으로 프로퍼티

'metadata' columns will be exported, prefixed by 'metadata_'
public bool $exportMetadata
리턴 boolean

$lineEnd 공개적으로 프로퍼티

Line end
public string $lineEnd
리턴 string

$separator 공개적으로 프로퍼티

Column separator
public string $separator
리턴 string