Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / search / Zend / Search / Lucene / Index / SegmentInfoPriorityQueue.php
blob4d0f346ceb214e86792c5d2d7c4d990dee278d23
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
15 * @category Zend
16 * @package Zend_Search_Lucene
17 * @subpackage Index
18 * @copyright Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
23 /** Zend_Search_Lucene_Exception */
24 require_once $CFG->dirroot.'/search/Zend/Search/Lucene/Exception.php';
26 /** Zend_Search_Lucene */
27 require_once $CFG->dirroot.'/search/Zend/Search/Lucene/PriorityQueue.php';
30 /**
31 * @category Zend
32 * @package Zend_Search_Lucene
33 * @subpackage Index
34 * @copyright Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
35 * @license http://framework.zend.com/license/new-bsd New BSD License
37 class Zend_Search_Lucene_Index_SegmentInfoPriorityQueue extends Zend_Search_Lucene_PriorityQueue
39 /**
40 * Compare elements
42 * Returns true, if $el1 is less than $el2; else otherwise
44 * @param mixed $segmentInfo1
45 * @param mixed $segmentInfo2
46 * @return boolean
48 protected function _less($segmentInfo1, $segmentInfo2)
50 return strcmp($segmentInfo1->currentTerm()->key(), $segmentInfo2->currentTerm()->key()) < 0;