Semantic MediaWiki and related extensions
Public Member Functions | List of all members
SMW\Query\ExportPrinter Interface Reference
Inheritance diagram for SMW\Query\ExportPrinter:
Inheritance graph
[legend]
Collaboration diagram for SMW\Query\ExportPrinter:
Collaboration graph
[legend]

Public Member Functions

 outputAsFile (QueryResult $queryResult, array $params)
 
 getMimeType (QueryResult $queryResult)
 
 getFileName (QueryResult $queryResult)
 
- Public Member Functions inherited from SMW\Query\ResultPrinter
 getResult (QueryResult $results, array $fullParams, $outputMode)
 
 getQueryMode ( $context)
 
 getName ()
 
 setShowErrors ( $show)
 
 getParamDefinitions (array $definitions)
 
 isExportFormat ()
 

Detailed Description

Interface for SMW export related result printers

GNU GPL v2+

Since
1.8
Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >

Member Function Documentation

◆ getFileName()

SMW\Query\ExportPrinter::getFileName ( QueryResult  $queryResult)

Some printers can produce not only embeddable HTML or Wikitext, but can also produce stand-alone files. An example is RSS or iCalendar. This function returns a filename that is to be sent to the caller in such a case (the default filename is created by browsers from the URL, and it is often not pretty).

Parameters
QueryResult$queryResult
Returns
string|boolean

Implemented in SMW\Query\ResultPrinters\FeedExportPrinter, SMW\Query\ResultPrinters\TemplateFileExportPrinter, SMW\Query\ResultPrinters\RdfResultPrinter, SMW\Query\ResultPrinters\JsonResultPrinter, SMW\Query\ResultPrinters\CsvFileExportPrinter, and SMW\Query\ResultPrinters\DsvResultPrinter.

◆ getMimeType()

SMW\Query\ExportPrinter::getMimeType ( QueryResult  $queryResult)

Some printers do not mainly produce embeddable HTML or Wikitext, but produce stand-alone files. An example is RSS or iCalendar. This function returns the mimetype string that this file would have, or FALSE if no standalone files are produced.

If this function returns something other than FALSE, then the printer will not be regarded as a printer that displays in-line results. This is used to determine if a file output should be generated in Special:Ask.

Since
1.8
Parameters
QueryResult$queryResult
Returns
string

Implemented in SMW\Query\ResultPrinters\FeedExportPrinter, SMW\Query\ResultPrinters\TemplateFileExportPrinter, SMW\Query\ResultPrinters\JsonResultPrinter, SMW\Query\ResultPrinters\CsvFileExportPrinter, SMW\Query\ResultPrinters\RdfResultPrinter, and SMW\Query\ResultPrinters\DsvResultPrinter.

◆ outputAsFile()

SMW\Query\ExportPrinter::outputAsFile ( QueryResult  $queryResult,
array  $params 
)

Outputs the result as file.

Since
1.8
Parameters
QueryResult$queryResult
array$params

Implemented in SMW\Query\ResultPrinters\FeedExportPrinter.


The documentation for this interface was generated from the following file:

About | General disclaimer | Privacy policy