Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
Search2Default
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
0.00% covered (danger)
0.00%
0 / 1
 getHierarchyType
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
1<?php
2
3/**
4 * Default model for Search2 records -- used when a more specific model based on
5 * the record_format field cannot be found.
6 *
7 * PHP version 8
8 *
9 * Copyright (C) Villanova University 2010.
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2,
13 * as published by the Free Software Foundation.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23 *
24 * @category VuFind
25 * @package  RecordDrivers
26 * @author   Demian Katz <demian.katz@villanova.edu>
27 * @author   Samuli Sillanpää <samuli.sillanpaa@helsinki.fi>
28 * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
29 * @link     https://vufind.org/wiki/development:plugins:record_drivers Wiki
30 */
31
32namespace VuFind\RecordDriver;
33
34/**
35 * Default model for Search2 records -- used when a more specific model based on
36 * the record_format field cannot be found.
37 *
38 * This should be used as the base class for all Solr-based record models.
39 *
40 * @category VuFind
41 * @package  RecordDrivers
42 * @author   Demian Katz <demian.katz@villanova.edu>
43 * @author   Samuli Sillanpää <samuli.sillanpaa@helsinki.fi>
44 * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
45 * @link     https://vufind.org/wiki/development:plugins:record_drivers Wiki
46 *
47 * @SuppressWarnings(PHPMD.ExcessivePublicCount)
48 */
49class Search2Default extends SolrDefault
50{
51    /**
52     * Used for identifying search backends
53     *
54     * @var string
55     */
56    protected $sourceIdentifier = 'Search2';
57
58    /**
59     * Get the Hierarchy Type (false if none)
60     *
61     * @return string|bool
62     */
63    public function getHierarchyType()
64    {
65        return parent::getHierarchyType() ? 'search2' : false;
66    }
67}