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

Public Member Functions

 setPrintRequests (array $printRequests)
 

Static Public Member Functions

static resolveFormatAliases (&$format)
 

Protected Member Functions

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

Protected Attributes

 $printRequests = array()
 

Detailed Description

Definition for the format parameter.

Since
1.6.2
Deprecated:
since 1.9

GNU GPL v2+

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

Member Function Documentation

SMWParamFormat::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
SMWParamFormat::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
1.5.2
SMWParamFormat::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
static SMWParamFormat::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.
SMWParamFormat::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

Member Data Documentation

SMWParamFormat::$printRequests = array()
protected

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