| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  | declare(strict_types=1); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  | /* | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |  * This file is part of the TYPO3 CMS project. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  |  * It is free software; you can redistribute it and/or modify it under | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  |  * the terms of the GNU General Public License, either version 2 | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  |  * of the License, or any later version. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  |  * For the full copyright and license information, please read the | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  |  * LICENSE.txt file that was distributed with this source code. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  |  * The TYPO3 project - inspiring people to share! | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  | namespace ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\Grouping; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  | use ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\Result\SearchResultCollection; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  | use ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\SearchResultSet; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  | use ApacheSolrForTypo3\Solr\Domain\Search\SearchRequest; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |  * Class GroupItem | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  |  * @author Frans Saris <[email protected]> | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  |  * @author Timo Hund <[email protected]> | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  | class GroupItem extends SearchResultSet | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  | { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  |      * @var string | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  |     protected string $groupValue = ''; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |      * @var int | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  |     protected int $allResultCount = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  |      * @var int | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 45 |  |  |     protected int $start = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |      * @var float | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  |     protected float $maximumScore = 0.0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 52 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 53 |  |  |      * @var SearchResultCollection | 
            
                                                                                                            
                            
            
                                    
            
            
                | 54 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 55 |  |  |     protected SearchResultCollection $searchResults; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 56 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 57 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 58 |  |  |      * @var Group | 
            
                                                                                                            
                            
            
                                    
            
            
                | 59 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 60 |  |  |     protected Group $group; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 61 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 62 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 63 |  |  |      * @param Group $group | 
            
                                                                                                            
                            
            
                                    
            
            
                | 64 |  |  |      * @param string $groupValue | 
            
                                                                                                            
                            
            
                                    
            
            
                | 65 |  |  |      * @param int $numFound | 
            
                                                                                                            
                            
            
                                    
            
            
                | 66 | 9 |  |      * @param int $start | 
            
                                                                                                            
                            
            
                                    
            
            
                | 67 |  |  |      * @param float $maxScore | 
            
                                                                                                            
                            
            
                                    
            
            
                | 68 | 9 |  |      * @param SearchRequest $usedSearchRequest | 
            
                                                                                                            
                            
            
                                    
            
            
                | 69 | 9 |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 70 | 9 |  |     public function __construct( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 71 | 9 |  |         Group $group, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 72 | 9 |  |         string $groupValue, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 73 | 9 |  |         int $numFound, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 74 |  |  |         int $start, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 75 |  |  |         float $maxScore, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 76 |  |  |         SearchRequest $usedSearchRequest | 
            
                                                                                                            
                            
            
                                    
            
            
                | 77 |  |  |     ) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 78 |  |  |         parent::__construct(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 79 |  |  |         $this->group = $group; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 80 |  |  |         $this->groupValue = $groupValue; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 81 | 2 |  |         $this->allResultCount = $numFound; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 82 |  |  |         $this->start = $start; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 83 | 2 |  |         $this->maximumScore = $maxScore; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 84 |  |  |         $this->searchResults = new SearchResultCollection(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 85 |  |  |         $this->usedSearchRequest = $usedSearchRequest; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 86 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 87 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 88 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 89 |  |  |      * Get groupValue | 
            
                                                                                                            
                            
            
                                    
            
            
                | 90 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 91 | 1 |  |      * @return string | 
            
                                                                                                            
                            
            
                                    
            
            
                | 92 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 93 | 1 |  |     public function getGroupValue(): string | 
            
                                                                                                            
                            
            
                                    
            
            
                | 94 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 95 |  |  |         return $this->groupValue; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 96 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 97 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 98 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 99 |  |  |      * Get start | 
            
                                                                                                            
                            
            
                                    
            
            
                | 100 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 101 | 1 |  |      * @return int | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 102 |  |  |      */ | 
            
                                                                        
                            
            
                                    
            
            
                | 103 | 1 |  |     public function getStart(): int | 
            
                                                                        
                            
            
                                    
            
            
                | 104 |  |  |     { | 
            
                                                                        
                            
            
                                    
            
            
                | 105 |  |  |         return $this->start; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 106 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 107 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 108 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 109 |  |  |      * @return Group | 
            
                                                                                                            
                            
            
                                    
            
            
                | 110 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 111 | 1 |  |     public function getGroup(): Group | 
            
                                                                                                            
                            
            
                                    
            
            
                | 112 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 113 | 1 |  |         return $this->group; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 114 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 115 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 116 |  |  |  |