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

Public Member Functions

 __construct (SMWDIWikiPage $resultPage, PrintRequest $printRequest, SMWStore $store)
 
 getStore ()
 
 getResultSubject ()
 
 setResolverJournal (ResolverJournal $resolverJournal)
 
 setQueryToken (QueryToken $queryToken=null)
 
 setContextPage (DIWikiPage $contextPage=null)
 
 getContent ()
 
 getPrintRequest ()
 
 getNextDataItem ()
 
 reset ()
 
 getNextDataValue ()
 
 getNextText ( $outputMode, $linker=null)
 

Static Public Member Functions

static factory (SMWDIWikiPage $resultPage, PrintRequest $printRequest, QueryResult $queryResult)
 

Protected Member Functions

 loadContent ()
 
 getRequestOptions ( $useLimit=true)
 

Detailed Description

Container for the contents of a single result field of a query result, i.e. basically an array of SMWDataItems with some additional parameters. The content of the array is fetched on demand only.

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

Constructor & Destructor Documentation

◆ __construct()

SMWResultArray::__construct ( SMWDIWikiPage  $resultPage,
PrintRequest  $printRequest,
SMWStore  $store 
)

Constructor.

Parameters
SMWDIWikiPage$resultPage
PrintRequest$printRequest
SMWStore$store

Member Function Documentation

◆ factory()

static SMWResultArray::factory ( SMWDIWikiPage  $resultPage,
PrintRequest  $printRequest,
QueryResult  $queryResult 
)
static
Since
3.1
Parameters
SMWDIWikiPage$resultPage
PrintRequest$printRequest
QueryResult$queryResult
Returns
ResultArray

◆ getContent()

SMWResultArray::getContent ( )

Returns an array of SMWDataItem objects that contain the results of the given print request for the given result object.

Returns
SMWDataItem[]|false

◆ getNextDataItem()

SMWResultArray::getNextDataItem ( )

Return the next SMWDataItem object or false if no further object exists.

Since
1.6
Returns
SMWDataItem|false

◆ getNextDataValue()

SMWResultArray::getNextDataValue ( )

Return an SMWDataValue object for the next SMWDataItem object or false if no further object exists.

Since
1.6
Returns
SMWDataValue|false

◆ getNextText()

SMWResultArray::getNextText (   $outputMode,
  $linker = null 
)

Return the main text representation of the next SMWDataItem object in the specified format, or false if no further object exists.

The parameter $linker controls linking of title values and should be some Linker object (or NULL for no linking).

Parameters
integer$outputMode
mixed$linker
Returns
string|false

◆ getPrintRequest()

SMWResultArray::getPrintRequest ( )

Return a PrintRequest object describing what is contained in this result set.

Returns
PrintRequest

◆ getRequestOptions()

SMWResultArray::getRequestOptions (   $useLimit = true)
protected

Make a request option object based on the given parameters, and return NULL if no such object is required. The parameter defines if the limit should be taken into account, which is not always desired (especially if results are to be cached for future use).

Parameters
boolean$useLimit
Returns
SMWRequestOptions|null

◆ getResultSubject()

SMWResultArray::getResultSubject ( )

Returns the SMWDIWikiPage object to which this SMWResultArray refers. If you only care for those objects, consider using SMWQueryResult::getResults() directly.

Returns
SMWDIWikiPage

◆ getStore()

SMWResultArray::getStore ( )

Get the SMWStore object that this result is based on.

Returns
SMWStore

◆ loadContent()

SMWResultArray::loadContent ( )
protected

Load results of the given print request and result subject. This is only done when needed.

◆ reset()

SMWResultArray::reset ( )

Set the internal pointer of the array of SMWDataItem objects to its first element. Return the first SMWDataItem object or false if the array is empty.

Since
1.7.1
Returns
SMWDataItem|false

◆ setContextPage()

SMWResultArray::setContextPage ( DIWikiPage  $contextPage = null)
Since
3.1
Parameters
DIWikiPage | null$contextPage

◆ setQueryToken()

SMWResultArray::setQueryToken ( QueryToken  $queryToken = null)
Since
2.5
Parameters
QueryToken | null$queryToken

◆ setResolverJournal()

SMWResultArray::setResolverJournal ( ResolverJournal  $resolverJournal)

Temporary track what entities are used while being instantiated, so an external service can have access to the list without requiring to resolve the objects independently.

Since
2.4
Parameters
ResolverJournal$resolverJournal

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

About | General disclaimer | Privacy policy