Inherits SMWResultPrinter.
Inherited by SRFHash.
Public Member Functions | |
| __construct ($format, $inline, $useValidator=true) | |
| Constructor. | |
| getQueryMode ($context) | |
| This function determines the query mode that is to be used for this printer in various contexts. | |
| getName () | |
| Get a human readable label for this printer. | |
| getParameters () | |
| A function to describe the allowed parameters of a query using any specific format - most query printers should override this function. | |
Protected Member Functions | |
| getResultText (SMWQueryResult $res, $outputmode) | |
| Return serialised results in specified format. | |
| fillDeliveryArray ($array=array(), $value=null) | |
| deliverPageTitle ($value, $link=false) | |
| deliverRecordField ($value, $link=false) | |
| deliverSingleValue ($value, $link=false) | |
| deliverMissingProperty (SMWResultArray $field) | |
| deliverSingleManyValuesData ($value_items, $containsRecord, $isPageTitle) | |
| deliverPropertiesManyValues ($manyValue_items, $isMissingProperty, $isPageTitle, SMWResultArray $data) | |
| deliverPageProperties ($perProperty_items) | |
| deliverQueryResultPages ($perPage_items) | |
| createArray ($array) | |
| Helper function to create a new Array within 'Arrays' extension. | |
| initializeCfgValue ($dfltVal, $dfltCacheKey) | |
| getCfgSepText ($obj) | |
| handleParameters (array $params, $outputmode) | |
| Read an array of parameter values given as key-value-pairs and initialise internal member fields accordingly. | |
Protected Attributes | |
| $mSep | |
| $mPropSep | |
| $mManySep | |
| $mRecordSep | |
| $mHeaderSep | |
| $mArrayName = null | |
| $mShowPageTitles | |
| $mHideRecordGaps | |
| $mHidePropertyGaps | |
| $mMainLabelHack = false | |
Static Protected Attributes | |
| static | $mDefaultSeps = array() |
Definition at line 17 of file SRF_Array.php.
| SRFArray::__construct | ( | $ | format, | |
| $ | inline, | |||
| $ | useValidator = true | |||
| ) |
Constructor.
The parameter $format is a format string that may influence the processing details.
| string | $format | |
| $inline | ||
| boolean | $useValidator Deprecated since 1.6.2 |
TODO: how can we get the default or user skin here (depending on context)?
Reimplemented from SMWResultPrinter.
Definition at line 36 of file SRF_Array.php.
| SRFArray::getQueryMode | ( | $ | context | ) |
This function determines the query mode that is to be used for this printer in various contexts.
The query mode influences how queries to that printer should be processed to obtain a result. Possible values are SMWQuery::MODE_INSTANCES (retrieve instances), SMWQuery::MODE_NONE (do nothing), SMWQuery::MODE_COUNT (get number of results), SMWQuery::MODE_DEBUG (return debugging text). Possible values for context are SMWQueryProcessor::SPECIAL_PAGE, SMWQueryProcessor::INLINE_QUERY, SMWQueryProcessor::CONCEPT_DESC.
The default implementation always returns SMWQuery::MODE_INSTANCES. File exports like RSS will use MODE_INSTANCES on special pages (so that instances are retrieved for the export) and MODE_NONE otherwise (displaying just a download link).
Reimplemented from SMWResultPrinter.
Definition at line 43 of file SRF_Array.php.
References SMWQuery::MODE_INSTANCES.
| SRFArray::getName | ( | ) |
Get a human readable label for this printer.
The default is to return just the format identifier. Concrete implementations may refer to messages here. The format name is normally not used in wiki text but only in forms etc. hence the user language should be used when retrieving messages.
Reimplemented from SMWResultPrinter.
Definition at line 47 of file SRF_Array.php.
| SRFArray::getResultText | ( | SMWQueryResult $ | res, | |
| $ | outputmode | |||
| ) | [protected] |
Return serialised results in specified format.
Implemented by subclasses.
Reimplemented from SMWResultPrinter.
Definition at line 59 of file SRF_Array.php.
References deliverMissingProperty(), deliverPageProperties(), deliverPageTitle(), deliverPropertiesManyValues(), deliverQueryResultPages(), deliverRecordField(), deliverSingleManyValuesData(), deliverSingleValue(), fillDeliveryArray(), and SMWDataValueFactory::newDataItemValue().
| SRFArray::fillDeliveryArray | ( | $ | array = array(), |
|
| $ | value = null | |||
| ) | [protected] |
| SRFArray::deliverPageTitle | ( | $ | value, | |
| $ | link = false | |||
| ) | [protected] |
Reimplemented in SRFHash.
Definition at line 143 of file SRF_Array.php.
References deliverSingleValue().
Referenced by getResultText().
| SRFArray::deliverRecordField | ( | $ | value, | |
| $ | link = false | |||
| ) | [protected] |
Definition at line 146 of file SRF_Array.php.
References deliverSingleValue().
Referenced by getResultText().
| SRFArray::deliverSingleValue | ( | $ | value, | |
| $ | link = false | |||
| ) | [protected] |
Definition at line 154 of file SRF_Array.php.
Referenced by SRFHash::deliverPageTitle(), deliverPageTitle(), deliverRecordField(), and getResultText().
| SRFArray::deliverMissingProperty | ( | SMWResultArray $ | field | ) | [protected] |
: System for Default values?...
Definition at line 159 of file SRF_Array.php.
Referenced by getResultText().
| SRFArray::deliverSingleManyValuesData | ( | $ | value_items, | |
| $ | containsRecord, | |||
| $ | isPageTitle | |||
| ) | [protected] |
| SRFArray::deliverPropertiesManyValues | ( | $ | manyValue_items, | |
| $ | isMissingProperty, | |||
| $ | isPageTitle, | |||
| SMWResultArray $ | data | |||
| ) | [protected] |
Definition at line 172 of file SRF_Array.php.
References SMWResultArray::getPrintRequest().
Referenced by getResultText().
| SRFArray::deliverPageProperties | ( | $ | perProperty_items | ) | [protected] |
Reimplemented in SRFHash.
Definition at line 185 of file SRF_Array.php.
Referenced by getResultText().
| SRFArray::deliverQueryResultPages | ( | $ | perPage_items | ) | [protected] |
Reimplemented in SRFHash.
Definition at line 190 of file SRF_Array.php.
References createArray().
Referenced by getResultText().
| SRFArray::createArray | ( | $ | array | ) | [protected] |
Helper function to create a new Array within 'Arrays' extension.
Takes care of different versions as well as the old 'ArrayExtension'.
ToDo: is there a way to get the actual parser which has started the query?
Reimplemented in SRFHash.
Definition at line 203 of file SRF_Array.php.
Referenced by deliverQueryResultPages(), and handleParameters().
| SRFArray::initializeCfgValue | ( | $ | dfltVal, | |
| $ | dfltCacheKey | |||
| ) | [protected] |
Definition at line 237 of file SRF_Array.php.
References $srfgArraySepTextualFallbacks, and getCfgSepText().
Referenced by getParameters().
| SRFArray::getCfgSepText | ( | $ | obj | ) | [protected] |
Definition at line 250 of file SRF_Array.php.
References SMWResultPrinter::$params.
Referenced by initializeCfgValue().
| SRFArray::handleParameters | ( | array $ | params, | |
| $ | outputmode | |||
| ) | [protected] |
Read an array of parameter values given as key-value-pairs and initialise internal member fields accordingly.
Possibly overwritten (extended) by subclasses.
| array | $params | |
| $outputmode |
Reimplemented from SMWResultPrinter.
Reimplemented in SRFHash.
Definition at line 295 of file SRF_Array.php.
References createArray().
| SRFArray::getParameters | ( | ) |
A function to describe the allowed parameters of a query using any specific format - most query printers should override this function.
TODO: refactor non-printer params up to the query processor and do all param handling there.
Reimplemented from SMWResultPrinter.
Reimplemented in SRFHash.
Definition at line 342 of file SRF_Array.php.
References SMWResultPrinter::$params, $smwgQMaxInlineLimit, $srfgArrayHeaderSep, $srfgArrayManySep, $srfgArrayPropSep, $srfgArrayRecordSep, $srfgArraySep, SMWQueryProcessor::getParameters(), and initializeCfgValue().
SRFArray::$mDefaultSeps = array() [static, protected] |
Definition at line 19 of file SRF_Array.php.
SRFArray::$mSep [protected] |
Definition at line 20 of file SRF_Array.php.
SRFArray::$mPropSep [protected] |
Definition at line 21 of file SRF_Array.php.
SRFArray::$mManySep [protected] |
Definition at line 22 of file SRF_Array.php.
SRFArray::$mRecordSep [protected] |
Definition at line 23 of file SRF_Array.php.
SRFArray::$mHeaderSep [protected] |
Definition at line 24 of file SRF_Array.php.
SRFArray::$mArrayName = null [protected] |
Definition at line 25 of file SRF_Array.php.
SRFArray::$mShowPageTitles [protected] |
Definition at line 26 of file SRF_Array.php.
SRFArray::$mHideRecordGaps [protected] |
Definition at line 28 of file SRF_Array.php.
SRFArray::$mHidePropertyGaps [protected] |
Definition at line 29 of file SRF_Array.php.
SRFArray::$mMainLabelHack = false [protected] |
Definition at line 34 of file SRF_Array.php.
1.5.6