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

Public Member Functions

 __construct ($format, $inline=true, $useValidator=true)
 
 getQueryMode ($context)
 
 getName ()
 
 getParamDefinitions (array $definitions)
 
- Public Member Functions inherited from SMW\ResultPrinter
 __construct ($format, $inline=true, $useValidator=false)
 
 isEnabledFeature ($feature)
 
 getQueryMode ($context)
 
 getName ()
 
 setShowErrors ($show)
 
 getParameters ()
 
 getParamDefinitions (array $definitions)
 
 getNamedParameters (array $definitions=array())
 
 isExportFormat ()
 
 getDefaultSort ()
 
- Public Member Functions inherited from SMW\QueryResultPrinter
 getResult (QueryResult $results, array $fullParams, $outputMode)
 

Protected Member Functions

 getResultText (SMWQueryResult $res, $outputmode)
 
 fillDeliveryArray ($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)
 
 initializeCfgValue ($dfltVal, $dfltCacheKey)
 
 getCfgSepText ($obj)
 
 handleParameters (array $params, $outputmode)
 
- Protected Member Functions inherited from SMW\ResultPrinter
 getResultText (SMWQueryResult $res, $outputMode)
 
 buildResult (SMWQueryResult $results)
 
 handleParameters (array $params, $outputMode)
 
 postProcessParameters ()
 
 getLinker ($firstcol=false)
 
 getFurtherResultsLink (SMWQueryResult $res, $outputMode)
 
 getErrorString (SMWQueryResult $res)
 
 escapeText ($text, $outputmode)
 
 getSearchLabel ($outputmode)
 
 linkFurtherResults (SMWQueryResult $results)
 
 addError ($errorMessage)
 
 textDisplayParameters ()
 
 exportFormatParameters ()
 

Protected Attributes

 $mSep
 
 $mPropSep
 
 $mManySep
 
 $mRecordSep
 
 $mHeaderSep
 
 $mArrayName = null
 
 $mShowPageTitles
 
 $mHideRecordGaps
 
 $mHidePropertyGaps
 
 $mMainLabelHack = false
 
- Protected Attributes inherited from SMW\ResultPrinter
 $m_params
 
 $params
 
 $fullParams
 
 $outputMode
 
 $results
 
 $mIntro = ''
 
 $mOutro = ''
 
 $mSearchlabel = null
 
 $mDefault = ''
 
 $mFormat
 
 $mLinkFirst
 
 $mLinkOthers
 
 $mShowHeaders = SMW_HEADERS_SHOW
 
 $mShowErrors = true
 
 $mInline
 
 $mLinker
 
 $mErrors = array()
 
 $isHTML = false
 
 $hasTemplates = false
 

Static Protected Attributes

static $mDefaultSeps = []
 

Additional Inherited Members

- Static Public Attributes inherited from SMW\ResultPrinter
static $maxRecursionDepth = 2
 

Detailed Description

Array format

Constructor & Destructor Documentation

SRFArray::__construct (   $format,
  $inline = true,
  $useValidator = true 
)

Member Function Documentation

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?

SRFArray::deliverMissingProperty ( SMWResultArray  $field)
protected

: System for Default values?...

SRFArray::deliverPageProperties (   $perProperty_items)
protected
SRFArray::deliverPageTitle (   $value,
  $link = false 
)
protected
SRFArray::deliverPropertiesManyValues (   $manyValue_items,
  $isMissingProperty,
  $isPageTitle,
SMWResultArray  $data 
)
protected
SRFArray::deliverQueryResultPages (   $perPage_items)
protected
SRFArray::deliverRecordField (   $value,
  $link = false 
)
protected
SRFArray::deliverSingleManyValuesData (   $value_items,
  $containsRecord,
  $isPageTitle 
)
protected
SRFArray::deliverSingleValue (   $value,
  $link = false 
)
protected
SRFArray::fillDeliveryArray (   $array = [],
  $value = null 
)
protected
SRFArray::getCfgSepText (   $obj)
protected
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.

Returns
string

Implements SMW\QueryResultPrinter.

SRFArray::getParamDefinitions ( array  $definitions)
See also
SMWResultPrinter::getParamDefinitions
Since
1.8
Parameters
$definitionsarray of IParamDefinition
Returns
array of IParamDefinition|array

Implements SMW\QueryResultPrinter.

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).

Parameters
$context
Returns
integer

Implements SMW\QueryResultPrinter.

SRFArray::getResultText ( SMWQueryResult  $res,
  $outputmode 
)
protected

first field is always the page title, except, mainlabel is set to '-'

Todo:
Is there some other way to check the data value directly for being the page title or not? SMWs behavior could change on mainlabel handling...
SRFArray::handleParameters ( array  $params,
  $outputmode 
)
protected
SRFArray::initializeCfgValue (   $dfltVal,
  $dfltCacheKey 
)
protected

Member Data Documentation

SRFArray::$mArrayName = null
protected
SRFArray::$mDefaultSeps = []
staticprotected
SRFArray::$mHeaderSep
protected
SRFArray::$mHidePropertyGaps
protected
SRFArray::$mHideRecordGaps
protected
SRFArray::$mMainLabelHack = false
protected
SRFArray::$mManySep
protected
SRFArray::$mPropSep
protected
SRFArray::$mRecordSep
protected
SRFArray::$mSep
protected
SRFArray::$mShowPageTitles
protected

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