PHP Класс Piwik\ReportRenderer

All new Renderers must be copied in ReportRenderer and added to the $availableReportRenderers.
Наследование: extends BaseFactory
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$idSite

Открытые методы

Метод Описание
getAttachments ( $report, $processedReports, $prettyDate ) : array Get report attachments, ex. graph images
getRenderedReport ( ) Get rendered report
getStaticGraph ( $reportMetadata, $width, $height, $evolution, $segment )
renderFrontPage ( string $reportTitle, string $prettyDate, string $description, array $reportMetadata, array $segment ) Generate the first page.
renderReport ( array $processedReport ) Render the provided report.
sendToBrowserDownload ( string $filename ) Send rendering to browser with a 'download file' prompt
sendToBrowserInline ( string $filename ) Output rendering to browser
sendToDisk ( string $filename ) : string Save rendering to disk
setIdSite ( integer $idSite ) Sets the site id
setLocale ( string $locale ) Initialize locale settings.

Защищенные методы

Метод Описание
getClassNameFromClassId ( $rendererType )
getInvalidClassIdExceptionMessage ( $rendererType )
getOutputPath ( $filename ) : string Return $filename with temp directory and delete file
inlineToBrowser ( $contentType, $content )
makeFilenameWithExtension ( string $filename, string $extension ) : string Append $extension to $filename
normalizeRendererType ( $rendererType )
processTableFormat ( $reportMetadata, $report, $reportColumns ) : array Convert a dimension-less report to a multi-row two-column data table
sendToBrowser ( $filename, $extension, $contentType, $content )
writeFile ( $filename, $extension, $content )

Описание методов

getAttachments() абстрактный публичный метод

Get report attachments, ex. graph images
abstract public getAttachments ( $report, $processedReports, $prettyDate ) : array
$report
$processedReports
$prettyDate
Результат array

getClassNameFromClassId() защищенный статический метод

protected static getClassNameFromClassId ( $rendererType )

getInvalidClassIdExceptionMessage() защищенный статический метод

protected static getInvalidClassIdExceptionMessage ( $rendererType )

getOutputPath() защищенный статический метод

Return $filename with temp directory and delete file
protected static getOutputPath ( $filename ) : string
$filename
Результат string path of file in temp directory

getRenderedReport() абстрактный публичный метод

Get rendered report
abstract public getRenderedReport ( )

getStaticGraph() публичный статический метод

public static getStaticGraph ( $reportMetadata, $width, $height, $evolution, $segment )

inlineToBrowser() защищенный статический метод

protected static inlineToBrowser ( $contentType, $content )

makeFilenameWithExtension() защищенный статический метод

Append $extension to $filename
protected static makeFilenameWithExtension ( string $filename, string $extension ) : string
$filename string
$extension string
Результат string filename with extension

normalizeRendererType() защищенный статический метод

protected static normalizeRendererType ( $rendererType )

processTableFormat() защищенный статический метод

Convert a dimension-less report to a multi-row two-column data table
protected static processTableFormat ( $reportMetadata, $report, $reportColumns ) : array
$reportMetadata array
$report DataTable
$reportColumns array
Результат array DataTable $report & array $columns

renderFrontPage() абстрактный публичный метод

Generate the first page.
abstract public renderFrontPage ( string $reportTitle, string $prettyDate, string $description, array $reportMetadata, array $segment )
$reportTitle string
$prettyDate string formatted date
$description string
$reportMetadata array metadata for all reports
$segment array segment applied to all reports

renderReport() абстрактный публичный метод

Multiple calls to this method before calling outputRendering appends each report content.
abstract public renderReport ( array $processedReport )
$processedReport array @see API::getProcessedReport()

sendToBrowser() защищенный статический метод

protected static sendToBrowser ( $filename, $extension, $contentType, $content )

sendToBrowserDownload() абстрактный публичный метод

Send rendering to browser with a 'download file' prompt
abstract public sendToBrowserDownload ( string $filename )
$filename string without path & without format extension

sendToBrowserInline() абстрактный публичный метод

Output rendering to browser
abstract public sendToBrowserInline ( string $filename )
$filename string without path & without format extension

sendToDisk() абстрактный публичный метод

Save rendering to disk
abstract public sendToDisk ( string $filename ) : string
$filename string without path & without format extension
Результат string path of file

setIdSite() публичный метод

Sets the site id
public setIdSite ( integer $idSite )
$idSite integer

setLocale() абстрактный публичный метод

If not called, locale settings defaults to 'en'
abstract public setLocale ( string $locale )
$locale string

writeFile() защищенный статический метод

protected static writeFile ( $filename, $extension, $content )

Описание свойств

$idSite защищенное свойство

protected $idSite