Semantic MediaWiki and related extensions
Public Member Functions | Protected Member Functions | List of all members
SMWResultArray Class Reference

Public Member Functions

 __construct (SMWDIWikiPage $resultPage, PrintRequest $printRequest, SMWStore $store)
 
 getStore ()
 
 getResultSubject ()
 
 setInMemoryEntityProcessList (InMemoryEntityProcessList $inMemoryEntityProcessList)
 
 setQueryToken (QueryToken $queryToken=null)
 
 getContent ()
 
 getPrintRequest ()
 
 getNextObject ()
 
 getNextDataItem ()
 
 reset ()
 
 getNextDataValue ()
 
 getNextText ($outputMode, $linker=null)
 

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

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

Constructor.

Parameters
SMWDIWikiPage$resultPage
PrintRequest$printRequest
SMWStore$store

Member Function Documentation

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
SMWResultArray::getNextDataItem ( )

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

Since
1.6
Returns
SMWDataItem|false
SMWResultArray::getNextDataValue ( )

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

Since
1.6
Returns
SMWDataValue|false
SMWResultArray::getNextObject ( )

Compatibility alias for getNextDatItem().

Deprecated:
since 1.6. Call getNextDataValue() or getNextDataItem() directly as needed. Method will vanish before SMW 1.7.
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
SMWResultArray::getPrintRequest ( )

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

Returns
PrintRequest
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
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
SMWResultArray::getStore ( )

Get the SMWStore object that this result is based on.

Returns
SMWStore
SMWResultArray::loadContent ( )
protected

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

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
SMWResultArray::setInMemoryEntityProcessList ( InMemoryEntityProcessList  $inMemoryEntityProcessList)

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
Returns
InMemoryEntityProcessList
SMWResultArray::setQueryToken ( QueryToken  $queryToken = null)
Since
2.5
Parameters
QueryToken | null$queryToken

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