Source code for file /joomla/application/search.php
Documentation is available at search.php
* @version $Id: search.php 6712 2007-02-24 02:00:40Z hackwar $
* @package Joomla.Framework
* @subpackage Application
* @copyright Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant to the
* GNU General Public License, and as distributed it includes or is derivative
* of works licensed under the GNU General Public License or other free or open
* source software licenses. See COPYRIGHT.php for copyright notices and
// Check to ensure this file is within the rest of the framework
* @package Joomla.Framework
* @subpackage Application
* @var string The text or phrase to search for
* @var string The ordering for the search
* @var string The match type: all|any|exact
* @var int The pagination for the complete result set
* @var int The total number of rows to return
* @var int The number of results already returned
* @var array An array of results
var $_queryLimitStart =
null;
function __construct( $needle, $matchType, $ordering, $areas, $limitstart=
0, $limit=
0 )
* Adds the total number of returns of the current search plugin to the
* running total and determines the limit and limitstart for the query
// the start and end points for this query
// the count for the start and end of the search
//echo "<br>n=$n | qStart=$qStart, qEnd=$qEnd | sStart=$sStart, sEnd=$sEnd<br>";
$this->_queryLimitStart =
0;
} else if ($qEnd <
$sStart) {
// not yet at the right page of results
} else if ($qStart >=
$sEnd) {
// we are passed the end of the page
} else if ($qStart <
$sStart) {
// these results clip the beginning of the results page
$this->_queryLimitStart =
$sStart -
$qStart;
$this->_queryLimit =
max( $this->limit, $qEnd -
$this->_queryLimitStart );
} else if ($qStart >=
$sStart ) {
// these results start within the results page
$this->_queryLimitStart =
$qStart;
$this->_queryLimit =
max( $this->limit, $qEnd -
$this->_queryLimitStart );
* Returns the limit start for the next search query
// used to skip over the paged results
return $this->_queryLimitStart;
* Returns the limit for the next search query
// used to return how many records to actually get from the current query
return $this->_queryLimit;
* @param array An array of object results
* @package Joomla.Framework
* @subpackage Application
* @return JParameter Parameters for the serach plugin
$pluginParams =
new JParameter( $plugin->params );
* @param array A flat array of search areas
* @param array A named array of search areas for the plugin
function inArea( $formAreas, $pluginAreas )