dmQuery Class Reference

Public Member Functions

Static Public Member Functions


Detailed Description

Definition at line 21 of file dmQuery.class.php.


Constructor & Destructor Documentation

dmQuery::__construct ( array $  terms,
array $  collections,
sort,
order,
page = 1,
rpp = 20,
ptr = null 
)
Parameters:
array terms Array of dmQueryTerm objects
array collections Array of dmCollection objects
string sort Nickname of field to sort by
string order 'asc' or 'desc'
int page Page number, as an integer
int rpp Rows per page, as an integer
int ptr If specified, will search within the compound object with alias $collections[0] and pointer $ptr
Exceptions:
dmIllegalArgumentException 
Deprecated:
To be replaced by a no-argument constructor

Definition at line 69 of file dmQuery.class.php.


Member Function Documentation

dmQuery::areSearchTerms (  ) 
Returns:
Boolean True if any search terms are present in the dmQuery, or false if not.
Since:
0.1

Definition at line 265 of file dmQuery.class.php.

dmQuery::getCollections (  )  [final]
Returns:
array Array of dmCollection objects

Definition at line 83 of file dmQuery.class.php.

Referenced by getSearchResults(), getURL(), ResultsDraw::linkedSuggestion(), and dmSitemapOutput::transformResults().

static dmQuery::getCurrent (  )  [static, final]
dmQuery::getFacetTerms ( grouped = true  )  [final]
Parameters:
Boolean grouped Whether to group facets by field name
Returns:
array Array of dmFacetTerm objects

Definition at line 98 of file dmQuery.class.php.

dmQuery::getNumPages (  )  [final]
Returns:
int Number of pages spanned by the result set
Since:
0.1

Definition at line 113 of file dmQuery.class.php.

Referenced by dmSitemapOutput::transformResults().

dmQuery::getNumResults (  )  [final]
Returns:
int Number of results in the result set
Since:
0.1

Definition at line 124 of file dmQuery.class.php.

Referenced by getNumPages().

dmQuery::getPage (  )  [final]
Returns:
int The current page number
Since:
0.1

Definition at line 132 of file dmQuery.class.php.

Referenced by getSearchResults().

dmQuery::getPtr (  )  [final]
Returns:
int The pointer of the object to search
Since:
0.1

Definition at line 140 of file dmQuery.class.php.

Referenced by getSearchResults().

dmQuery::getResultsPerPage (  )  [final]
Returns:
int
Since:
0.1

Definition at line 148 of file dmQuery.class.php.

Referenced by getNumPages(), and getSearchResults().

dmQuery::getSearchResults (  ) 
Returns:
Array of dmObjects
Exceptions:
dmInternalErrorException 
dmHTTPException 
Since:
0.1

Definition at line 168 of file dmQuery.class.php.

Referenced by dmRSSOutput::transformResults(), and dmAtomOutput::transformResults().

dmQuery::getSearchTerms ( index = null  ) 
Parameters:
int index Retrieve only the dmQueryTerm at this array index (optional)
Returns:
Array of dmQueryTerm objects
Since:
0.1

Definition at line 280 of file dmQuery.class.php.

Referenced by areSearchTerms(), getSearchResults(), and getURL().

dmQuery::getSuggestion (  )  [final]

Returns the suggestion generated for an apparently misspelled term with no results; e.g.

"airplaen" -> "Did you mean 'airplane'?"

Returns:
string

Definition at line 294 of file dmQuery.class.php.

Referenced by ResultsDraw::linkedSuggestion().

dmQuery::getURL ( representation = null  )  [final]
Parameters:
string representation Output format representation (one of 'atom', 'rss', or null for HTML template
Returns:
string Absolute URL to the results page executing the query
Since:
0.2

Definition at line 305 of file dmQuery.class.php.

dmQuery::save (  )  [final]

Saves the query to the user's session.

Since:
0.1
Deprecated:
To be renamed or eliminated

Definition at line 158 of file dmQuery.class.php.

static dmQuery::setCurrent ( dmQuery q  )  [static, final]
Parameters:
dmQuery q

Definition at line 53 of file dmQuery.class.php.


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

Generated on Fri Aug 20 13:16:50 2010 for dmBridge PHP API by  doxygen 1.6.1