20 $this->totalHits = $total;
28 if ( $this->resultSet ===
false ) {
32 return $this->resultSet->numRows();
36 if ( $this->resultSet ===
false ) {
40 if ( $this->results ===
null ) {
42 $this->resultSet->rewind();
43 while ( ( $row = $this->resultSet->fetchObject() ) !==
false ) {
44 $this->results[] = SearchResult::newFromTitle(
45 Title::makeTitle( $row->page_namespace, $row->page_title ), $this
53 if ( $this->resultSet ===
false ) {
57 $this->resultSet->free();
61 if ( !
is_null( $this->totalHits ) ) {
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
and give any other recipients of the Program a copy of this License along with the Program You may charge a fee for the physical act of transferring a and you may at your option offer warranty protection in exchange for a fee You may modify your copy or copies of the Program or any portion of thus forming a work based on the and copy and distribute such modifications or work under the terms of Section provided that you also meet all of these that in whole or in part contains or is derived from the Program or any part to be licensed as a whole at no charge to all third parties under the terms of this License c If the modified program normally reads commands interactively when you must cause when started running for such interactive use in the most ordinary to print or display an announcement including an appropriate copyright notice and a notice that there is no and telling the user how to view a copy of this and can be reasonably considered independent and separate works in then this and its terms
SearchResult[] $results
Cache of results - serialization of the result iterator as an array.
This class is used for different SQL-based search engines shipped with MediaWiki.
free()
Frees the result set, if applicable.
getTotalHits()
Some search modes return a total hit count for the query in the entire article database.
termMatches()
Fetch an array of regular expression fragments for matching the search terms as parsed by this engine...
ResultWrapper $resultSet
Result object from database.
string $terms
Requested search query.
int null $totalHits
Total number of hits for $terms.
extractResults()
Extract all the results in the result set as array.
__construct(ResultWrapper $resultSet, $terms, $total=null)