diff --git a/module/VuFind/src/VuFind/Search/Base/Options.php b/module/VuFind/src/VuFind/Search/Base/Options.php index e8ba9e61a05fc0388d25dc8f6c89af1b4c18e503..c49efc94921c467222dd4f6a9596139aac218a41 100644 --- a/module/VuFind/src/VuFind/Search/Base/Options.php +++ b/module/VuFind/src/VuFind/Search/Base/Options.php @@ -42,26 +42,102 @@ use VuFind\I18n\Translator\TranslatorAwareInterface, */ abstract class Options implements TranslatorAwareInterface { - // Available sort options + /** + * Available sort options + * + * @var array + */ protected $sortOptions = array(); + + /** + * Overall default sort option + * + * @var string + */ protected $defaultSort = 'relevance'; + + /** + * Handler-specific defaults + * + * @var array + */ protected $defaultSortByHandler = array(); + + /** + * RSS-specific sort option + * + * @var string + */ protected $rssSort = null; - // Search options for the user + /** + * Default search handler + * + * @var string + */ protected $defaultHandler = null; + + /** + * Advanced search handlers + * + * @var array + */ protected $advancedHandlers = array(); + + /** + * Basic search handlers + * + * @var array + */ protected $basicHandlers = array(); + + /** + * Special advanced facet settings + * + * @var string + */ protected $specialAdvancedFacets = ''; + + /** + * Should we retain filters by default? + * + * @var bool + */ protected $retainFiltersByDefault = true; + + /** + * Default filters to apply to new searches + * + * @var array + */ protected $defaultFilters = array(); - // Available limit options + /** + * Default limit option + * + * @var int + */ protected $defaultLimit = 20; + + /** + * Available limit options + * + * @var array + */ protected $limitOptions = array(); - // Available view options + /** + * Default view option + * + * @var string + */ protected $defaultView = 'list'; + + /** + * Available view options + * + * @var array + */ protected $viewOptions = array(); /** @@ -78,9 +154,25 @@ abstract class Options implements TranslatorAwareInterface */ protected $spellcheck = true; - // Shard settings + /** + * Available shards + * + * @var array + */ protected $shards = array(); + + /** + * Default selected shards + * + * @var array + */ protected $defaultSelectedShards = array(); + + /** + * Should we present shard checkboxes to the user? + * + * @var bool + */ protected $visibleShardCheckboxes = false; /** diff --git a/module/VuFind/src/VuFind/Search/Base/Params.php b/module/VuFind/src/VuFind/Search/Base/Params.php index 0bc43b0bb22458b20b49123bb8173f90a5d7a1b4..88ab925a832aa1dbe5d635e90caac898dfcf006a 100644 --- a/module/VuFind/src/VuFind/Search/Base/Params.php +++ b/module/VuFind/src/VuFind/Search/Base/Params.php @@ -51,28 +51,102 @@ class Params implements ServiceLocatorAwareInterface */ protected $query; - protected $searchTerms = array(); - // Page number + /** + * Page number + * + * @var int + */ protected $page = 1; - // Sort settings + + /** + * Sort setting + * + * @var string + */ protected $sort = null; + + /** + * Override special RSS sort feature? + * + * @var bool + */ protected $skipRssSort = false; - // Result limit + + /** + * Result limit + * + * @var int + */ protected $limit = 20; + + /** + * Search type (basic or advanced) + * + * @var string + */ protected $searchType = 'basic'; - // Shards + + /** + * Shards + * + * @var array + */ protected $selectedShards = array(); - // View + + /** + * View + * + * @var string + */ protected $view = null; - // \VuFind\Search\Base\Options subclass + + /** + * Search options + * + * @var Options + */ protected $options; - // Recommendation settings + + /** + * Recommendation settings + * + * @var array + */ protected $recommend = array(); + + /** + * Are recommendations turned on? + * + * @var bool + */ protected $recommendationEnabled = false; - // Facet settings + + /** + * Main facet configuration + * + * @var array + */ protected $facetConfig = array(); + + /** + * Checkbox facet configuration + * + * @var array + */ protected $checkboxFacets = array(); + + /** + * Applied filters + * + * @var array + */ protected $filterList = array(); + + /** + * Facets in "OR" mode + * + * @var array + */ protected $orFacets = array(); /** @@ -478,7 +552,7 @@ class Params implements ServiceLocatorAwareInterface /** * Return the sorting value * - * @return int + * @return string */ public function getSort() { diff --git a/module/VuFind/src/VuFind/Search/Base/Results.php b/module/VuFind/src/VuFind/Search/Base/Results.php index 040da95122b8383c4d1893719f314802aba1cad5..a2d283b8e277f3a9e57921933655214fae1d6952 100644 --- a/module/VuFind/src/VuFind/Search/Base/Results.php +++ b/module/VuFind/src/VuFind/Search/Base/Results.php @@ -44,24 +44,82 @@ use VuFindSearch\Service as SearchService; */ abstract class Results implements ServiceLocatorAwareInterface { + /** + * Search parameters + * + * @var Params + */ protected $params; - // Total number of results available + + /** + * Total number of results available + * + * @var int + */ protected $resultTotal = null; - // Override (only for use in very rare cases) + + /** + * Override (only for use in very rare cases) + * + * @var int + */ protected $startRecordOverride = null; - // Array of results (represented as Record Driver objects) retrieved on latest - // search: + + /** + * Array of results (represented as Record Driver objects) retrieved on latest + * search + * + * @var array + */ protected $results = null; - // An ID number for saving/retrieving search + + /** + * An ID number for saving/retrieving search + * + * @var int + */ protected $searchId = null; + + /** + * Is this a user-saved search? + * + * @var bool + */ protected $savedSearch = null; - // STATS + + /** + * Query start time + * + * @var float + */ protected $queryStartTime = null; + + /** + * Query end time + * + * @var float + */ protected $queryEndTime = null; + + /** + * Query time (total) + * + * @var float + */ protected $queryTime = null; - // Helper objects + + /** + * Helper objects + * + * @var array + */ protected $helpers = array(); - // Spelling + + /** + * Spelling suggestions + * + * @var array + */ protected $suggestions = null; /**