Semantic MediaWiki and related extensions
|
Public Member Functions | |
__construct ( $mode, $label, $data=null, $outputformat=false, array $params=null) | |
isDisconnected ( $isDisconnected) | |
markThisLabel ( $text) | |
hasLabelMarker () | |
isMode ( $mode) | |
getMode () | |
getLabel () | |
getCanonicalLabel () | |
getHTMLText ( $linker=null) | |
getWikiText ( $linker=false) | |
getText ( $outputMode, $linker=null) | |
getData () | |
getOutputFormat () | |
getTypeID () | |
getHash () | |
getSerialisation ( $showparams=false) | |
getParameter ( $key) | |
getParameters () | |
setParameter ( $key, $value) | |
removeParameter ( $key) | |
setLabel ( $label) | |
Static Public Member Functions | |
static | newFromText ( $text, $showMode=false, $useCanonicalLabel=false) |
Public Attributes | |
const | PRINT_CATS = 0 |
const | PRINT_PROP = 1 |
const | PRINT_THIS = 2 |
const | PRINT_CCAT = 3 |
const | PRINT_CHAIN = 4 |
Protected Attributes | |
$m_mode | |
$m_label | |
$m_data | |
$m_typeid = false | |
$m_outputformat | |
$m_hash = false | |
$m_params = [] | |
Container class for request for printout, as used in queries to obtain additional information for the retrieved results.
SMW\Query\PrintRequest::__construct | ( | $mode, | |
$label, | |||
$data = null , |
|||
$outputformat = false , |
|||
array | $params = null |
||
) |
Create a print request.
integer | $mode | a constant defining what to printout |
string | $label | the string label to describe this printout |
mixed | $data | optional data for specifying some request, might be a property object, title, or something else; interpretation depends on $mode |
mixed | $outputformat | optional string for specifying an output format, e.g. an output unit |
array | null | $params | optional array of further, named parameters for the print request |
SMW\Query\PrintRequest::getCanonicalLabel | ( | ) |
SMW\Query\PrintRequest::getData | ( | ) |
Return additional data related to the print request. The result might be an object of class PropertyValue or Title, or simply NULL if no data is required for the given type of printout.
SMW\Query\PrintRequest::getHash | ( | ) |
Return a hash string that is used to eliminate duplicate print requests. The hash also includes the chosen label, so it is possible to print the same date with different labels.
SMW\Query\PrintRequest::getHTMLText | ( | $linker = null | ) |
Obtain an HTML-formatted representation of the label. The $linker is a Linker object used for generating hyperlinks. If it is NULL, no links will be created.
SMW\Query\PrintRequest::getParameter | ( | $key | ) |
Returns the value of a named parameter.
$key | string the name of the parameter key |
SMW\Query\PrintRequest::getParameters | ( | ) |
Returns the array of parameters, where a string is mapped to a string.
SMW\Query\PrintRequest::getSerialisation | ( | $showparams = false | ) |
Serialise this object like print requests given in #ask.
$params | boolean that sets if the serialization should include the extra print request parameters |
SMW\Query\PrintRequest::getText | ( | $outputMode, | |
$linker = null |
|||
) |
Convenience method for accessing the text in either HTML or Wiki format.
SMW\Query\PrintRequest::getTypeID | ( | ) |
If this print request refers to some property, return the type id of this property. Otherwise return '_wpg' since all other types of print request return wiki pages.
SMW\Query\PrintRequest::getWikiText | ( | $linker = false | ) |
Obtain a Wiki-formatted representation of the label.
SMW\Query\PrintRequest::hasLabelMarker | ( | ) |
SMW\Query\PrintRequest::isDisconnected | ( | $isDisconnected | ) |
boolean | $isDisconnected |
SMW\Query\PrintRequest::isMode | ( | $mode | ) |
integer | $mode |
SMW\Query\PrintRequest::markThisLabel | ( | $text | ) |
string | $text |
|
static |
string | $text | |
boalean | $showMode | = false |
boolean | $useCanonicalLabel | = false |
SMW\Query\PrintRequest::removeParameter | ( | $key | ) |
Removes a request parameter
string | $key |
SMW\Query\PrintRequest::setLabel | ( | $label | ) |
string | $label |
SMW\Query\PrintRequest::setParameter | ( | $key, | |
$value | |||
) |
Sets a print request parameter.
$key | string Name of the parameter |
$value | string Value for the parameter |
const SMW\Query\PrintRequest::PRINT_CATS = 0 |
Query mode to print all direct categories of the current element.
const SMW\Query\PrintRequest::PRINT_CCAT = 3 |
Query mode to print whether current element is in given category (Boolean printout).
const SMW\Query\PrintRequest::PRINT_CHAIN = 4 |
Query mode indicating a chainable property value entity, with the last element to represent the printable output
const SMW\Query\PrintRequest::PRINT_PROP = 1 |
Query mode to print all property values of a certain attribute of the current element.
const SMW\Query\PrintRequest::PRINT_THIS = 2 |
Query mode to print the current element (page in result set).