SMWQueryResult Class Reference

List of all members.

Public Member Functions

 __construct (array $printRequests, SMWQuery $query, array $results, SMWStore $store, $furtherRes=false)
 Initialise the object with an array of SMWPrintRequest objects, which define the structure of the result "table" (one for each column).
 getStore ()
 Get the SMWStore object that this result is based on.
 getNext ()
 Return the next result row as an array of SMWResultArray objects, and advance the internal pointer.
 getCount ()
 Return number of available results.
 getResults ()
 Return an array of SMWDIWikiPage objects that make up the results stored in this object.
 getColumnCount ()
 Return the number of columns of result values that each row in this result set contains.
 getPrintRequests ()
 Return array of print requests (needed for printout since they contain property labels).
 getQueryString ()
 Returns the query string defining the conditions for the entities to be returned.
 hasFurtherResults ()
 Would there be more query results that were not shown due to a limit?
 getErrors ()
 Return error array, possibly empty.
 addErrors (array $errors)
 Adds an array of erros.
 getQueryLink ($caption=false)
 Create an SMWInfolink object representing a link to further query results.
 serializeToArray ()

Protected Attributes

 $mResults
 $mPrintRequests
 $mFurtherResults
 $mQuery
 $mStore


Detailed Description

Definition at line 20 of file SMW_QueryResult.php.


Constructor & Destructor Documentation

SMWQueryResult::__construct ( array $  printRequests,
SMWQuery query,
array $  results,
SMWStore store,
furtherRes = false 
)

Initialise the object with an array of SMWPrintRequest objects, which define the structure of the result "table" (one for each column).

TODO: Update documentation

Parameters:
array of SMWPrintRequest $printRequests
SMWQuery $query
array of SMWDIWikiPage $results
SMWStore $store
boolean $furtherRes

Definition at line 65 of file SMW_QueryResult.php.


Member Function Documentation

SMWQueryResult::getStore (  ) 

Get the SMWStore object that this result is based on.

Returns:
SMWStore

Definition at line 79 of file SMW_QueryResult.php.

SMWQueryResult::getNext (  ) 

Return the next result row as an array of SMWResultArray objects, and advance the internal pointer.

Returns:
array of SMWResultArray or false

Definition at line 89 of file SMW_QueryResult.php.

Referenced by SRFiCalendar::getIcal(), SRFvCard::getResultText(), SRFProcess::getResultText(), SMWRSSResultPrinter::getResultText(), and SMWCategoryResultPrinter::getResultText().

SMWQueryResult::getCount (  ) 

Return number of available results.

Returns:
integer

Definition at line 109 of file SMW_QueryResult.php.

Referenced by SMWCategoryResultPrinter::getResultText().

SMWQueryResult::getResults (  ) 

Return an array of SMWDIWikiPage objects that make up the results stored in this object.

Returns:
array of SMWDIWikiPage

Definition at line 119 of file SMW_QueryResult.php.

SMWQueryResult::getColumnCount (  ) 

Return the number of columns of result values that each row in this result set contains.

Returns:
integer

Definition at line 129 of file SMW_QueryResult.php.

Referenced by SMWTableResultPrinter::getResultText().

SMWQueryResult::getPrintRequests (  ) 

Return array of print requests (needed for printout since they contain property labels).

Returns:
array of SMWPrintRequest

Definition at line 139 of file SMW_QueryResult.php.

SMWQueryResult::getQueryString (  ) 

Returns the query string defining the conditions for the entities to be returned.

Returns:
string

Definition at line 149 of file SMW_QueryResult.php.

SMWQueryResult::hasFurtherResults (  ) 

Would there be more query results that were not shown due to a limit?

Returns:
boolean

Definition at line 158 of file SMW_QueryResult.php.

SMWQueryResult::getErrors (  ) 

Return error array, possibly empty.

Returns:
array

Definition at line 167 of file SMW_QueryResult.php.

SMWQueryResult::addErrors ( array $  errors  ) 

Adds an array of erros.

Parameters:
array $errors

Definition at line 177 of file SMW_QueryResult.php.

Referenced by SMWListResultPrinter::getResultText().

SMWQueryResult::getQueryLink ( caption = false  ) 

Create an SMWInfolink object representing a link to further query results.

This link can then be serialised or extended by further params first. The optional $caption can be used to set the caption of the link (though this can also be changed afterwards with SMWInfolink::setCaption()). If empty, the message 'smw_iq_moreresults' is used as a caption.

TODO: have this work for all params without manually overriding and adding everything (this is possible since the param handling changes in 1.7)

Parameters:
string|false $caption
Returns:
SMWInfolink

Definition at line 195 of file SMW_QueryResult.php.

References SMWInfolink::newInternalLink().

Referenced by SRFiCalendar::getIcalLink(), SMKMLPrinter::getLink(), SMWDSVResultPrinter::getLinkToFile(), SMWResultPrinter::getResult(), SRFvCard::getResultText(), SRFTimeline::getResultText(), SRFOutline::getResultText(), SRFBibTeX::getResultText(), SMWTableResultPrinter::getResultText(), SMWRSSResultPrinter::getResultText(), SMWRDFResultPrinter::getResultText(), SMWJSONResultPrinter::getResultText(), SMWEmbeddedResultPrinter::getResultText(), SMWCsvResultPrinter::getResultText(), and SMWCategoryResultPrinter::getResultText().

SMWQueryResult::serializeToArray (  ) 

See also:
SMWDISerializer::getSerializedQueryResult
Since:
1.7
Returns:
array

Definition at line 247 of file SMW_QueryResult.php.

References SMWDISerializer::getSerializedQueryResult().

Referenced by ApiSMWQuery::addQueryResult().


Member Data Documentation

SMWQueryResult::$mResults [protected]

Definition at line 26 of file SMW_QueryResult.php.

SMWQueryResult::$mPrintRequests [protected]

Definition at line 32 of file SMW_QueryResult.php.

SMWQueryResult::$mFurtherResults [protected]

Definition at line 38 of file SMW_QueryResult.php.

SMWQueryResult::$mQuery [protected]

Definition at line 45 of file SMW_QueryResult.php.

SMWQueryResult::$mStore [protected]

Definition at line 51 of file SMW_QueryResult.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