__construct()
error()
getErrors()
getWarnings()
hasErrors()
searchGeneral()
searchType()
searchUser()
setUser()
warning()
$_errors
$_searchModel
$_sourceHandler
$_viewingUser
$_warnings
Handles preparing to search for data and proxying to the source handler.
package | XenForo_Search |
---|
__construct(\XenForo_Model_Search $searchModel, \XenForo_Search_SourceHandler_Abstract $sourceHandler)
\XenForo_Search_SourceHandler_Abstract
null
Search source handler. Uses default if not specified.
error(\XenForo_Phrase | string $message, string $field)
An error will prevent the search from going through.
string
Field error applies to
getErrors() : array
array
Array of strings and/or XenForo_Phrase objectsgetWarnings() : array
array
Array of strings and/or XenForo_Phrase objectshasErrors() : boolean
boolean
searchGeneral(string $searchQuery, array $constraints, string $order, integer $maxResults) : array
This will usually be across all types of content, but could be limited but only using standard constraints.
string
Text to search for
array
Constraints to apply; handled by source handlers
string
Ordering; handled by source handlers
integer
Maximum number of results to return
array
Search results: [] => array(content type , id)searchType(\XenForo_Search_DataHandler_Abstract $typeHandler, string $searchQuery, array $constraints, string $order, boolean $groupByDiscussion, integer $maxResults) : array
string
Text to search for
array
Constraints to apply; handled by source handlers
string
Ordering; handled by source handlers
boolean
If true, fold/group the results by the discussion_id value
integer
Maximum number of results to return
array
Search results: [] => array(content type , id)searchUser(integer $userId, integer $maxDate, integer $maxResults) : array
integer
integer
If >0, the only messages older than this will be found
integer
array
Search results: [] => array(content type , id)setUser(array $viewingUser)
array
null
warning(\XenForo_Phrase | string $message, string $field)
This will be shown to the user on the search results page.
string
Field warning applies to
$_errors : array
$_viewingUser : array | null | false
$_warnings : array