Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SMW\Query\ResultFormat Class Reference
Inheritance diagram for SMW\Query\ResultFormat:
Inheritance graph
[legend]
Collaboration diagram for SMW\Query\ResultFormat:
Collaboration graph
[legend]

Public Member Functions

 setPrintRequests (array $printRequests)
 
 setShowMode ( $showMode)
 

Static Public Member Functions

static resolveFormatAliases (&$format)
 

Protected Member Functions

 getValidFormatName ( $value)
 
 getDefaultFormat ()
 
 formatValue ( $value, IParam $param, array &$definitions, array $params)
 

Protected Attributes

 $printRequests = []
 
 $showMode = false
 

Detailed Description

Definition for the format parameter.

GNU GPL v2+

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

Member Function Documentation

◆ formatValue()

SMW\Query\ResultFormat::formatValue (   $value,
IParam  $param,
array &  $definitions,
array  $params 
)
protected

Formats the parameter value to it's final result.

Since
1.8
Parameters
mixed$value
IParam$param
IParamDefinition[]$definitions
IParam[]$params
Returns
mixed

◆ getDefaultFormat()

SMW\Query\ResultFormat::getDefaultFormat ( )
protected

Determines and returns the default format, based on the queries print requests, if provided.

Since
1.6.2
Returns
string Array key in $smwgResultFormats

This hook allows extensions to override SMWs implementation of default result format handling.

Since
3.1

◆ getValidFormatName()

SMW\Query\ResultFormat::getValidFormatName (   $value)
protected

Takes a format name, which can be an alias and returns a format name which will be valid for sure. Aliases are resolved. If the given format name is invalid, the predefined default format will be returned.

Since
1.6.2
Parameters
string$value
Returns
string

◆ resolveFormatAliases()

static SMW\Query\ResultFormat::resolveFormatAliases ( $format)
static

Turns format aliases into main formats.

Since
1.6.2
Parameters
string$format
Returns
boolean Indicates if the passed format was an alias, and thus was changed.

◆ setPrintRequests()

SMW\Query\ResultFormat::setPrintRequests ( array  $printRequests)

Sets the print requests of the query, used for determining the default format if none is provided.

Since
1.6.2
Parameters
PrintRequest[]$printRequests

◆ setShowMode()

SMW\Query\ResultFormat::setShowMode (   $showMode)
Since
3.0
Parameters
bool$showMode

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

About | General disclaimer | Privacy policy