SMWResultArray Class Reference

List of all members.

Public Member Functions

 __construct (SMWDIWikiPage $resultPage, SMWPrintRequest $printRequest, SMWStore $store)
 Constructor.
 getStore ()
 Get the SMWStore object that this result is based on.
 getResultSubject ()
 Returns the SMWDIWikiPage object to which this SMWResultArray refers.
 getContent ()
 Returns an array of SMWDataItem objects that contain the results of the given print request for the given result object.
 getPrintRequest ()
 Return an SMWPrintRequest object describing what is contained in this result set.
 getNextObject ()
 Compatibility alias for getNextDatItem().
 getNextDataItem ()
 Return the next SMWDataItem object or false if no further object exists.
 reset ()
 Set the internal pointer of the array of SMWDataItem objects to its first element.
 getNextDataValue ()
 Return an SMWDataValue object for the next SMWDataItem object or false if no further object exists.
 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.

Protected Member Functions

 loadContent ()
 Load results of the given print request and result subject.
 getRequestOptions ($useLimit=true)
 Make a request option object based on the given parameters, and return NULL if no such object is required.

Protected Attributes

 $mPrintRequest
 $mResult
 $mStore
 $mContent

Static Protected Attributes

static $catCacheObj = false
static $catCache = false


Detailed Description

Definition at line 14 of file SMW_ResultArray.php.


Constructor & Destructor Documentation

SMWResultArray::__construct ( SMWDIWikiPage resultPage,
SMWPrintRequest printRequest,
SMWStore store 
)

Constructor.

Parameters:
SMWDIWikiPage $resultPage
SMWPrintRequest $printRequest
SMWStore $store

Definition at line 46 of file SMW_ResultArray.php.


Member Function Documentation

SMWResultArray::getStore (  ) 

Get the SMWStore object that this result is based on.

Returns:
SMWStore

Definition at line 58 of file SMW_ResultArray.php.

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

Definition at line 69 of file SMW_ResultArray.php.

SMWResultArray::getContent (  ) 

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

Returns:
array of SMWDataItem or false

Definition at line 79 of file SMW_ResultArray.php.

References loadContent().

SMWResultArray::getPrintRequest (  ) 

Return an SMWPrintRequest object describing what is contained in this result set.

Returns:
SMWPrintRequest

Definition at line 90 of file SMW_ResultArray.php.

Referenced by SRFArray::deliverPropertiesManyValues().

SMWResultArray::getNextObject (  ) 

Compatibility alias for getNextDatItem().

Deprecated:
since 1.6. Call getNextDataValue() or getNextDataItem() directly as needed. Method will vanish before SMW 1.7.

Definition at line 98 of file SMW_ResultArray.php.

References getNextDataValue().

SMWResultArray::getNextDataItem (  ) 

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

Since:
1.6
Returns:
SMWDataItem or false

Definition at line 109 of file SMW_ResultArray.php.

References loadContent().

Referenced by getNextDataValue().

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 or false

Definition at line 125 of file SMW_ResultArray.php.

References loadContent().

Referenced by loadContent().

SMWResultArray::getNextDataValue (  ) 

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

Since:
1.6
Returns:
SMWDataValue or false

Definition at line 138 of file SMW_ResultArray.php.

References getNextDataItem(), SMWDataValueFactory::newDataItemValue(), and SMWPrintRequest::PRINT_PROP.

Referenced by getNextObject(), and 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 or false

Definition at line 183 of file SMW_ResultArray.php.

References getNextDataValue().

SMWResultArray::loadContent (  )  [protected]

Load results of the given print request and result subject.

This is only done when needed.

NOTE: The limit is ignored here.

Definition at line 196 of file SMW_ResultArray.php.

References getRequestOptions(), SMWDataValueFactory::newDataItemValue(), SMWPrintRequest::PRINT_CATS, SMWPrintRequest::PRINT_CCAT, SMWPrintRequest::PRINT_PROP, SMWPrintRequest::PRINT_THIS, and reset().

Referenced by getContent(), getNextDataItem(), and reset().

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 or null

Definition at line 280 of file SMW_ResultArray.php.

Referenced by loadContent().


Member Data Documentation

SMWResultArray::$mPrintRequest [protected]

Definition at line 19 of file SMW_ResultArray.php.

SMWResultArray::$mResult [protected]

Definition at line 24 of file SMW_ResultArray.php.

SMWResultArray::$mStore [protected]

Definition at line 29 of file SMW_ResultArray.php.

SMWResultArray::$mContent [protected]

Definition at line 34 of file SMW_ResultArray.php.

SMWResultArray::$catCacheObj = false [static, protected]

Definition at line 36 of file SMW_ResultArray.php.

SMWResultArray::$catCache = false [static, protected]

Definition at line 37 of file SMW_ResultArray.php.


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

Generated on Sun Mar 18 07:15:43 2012 for Semantic MediaWiki by  doxygen 1.5.6