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
PluginManager
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 getExpectedInterface
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3/**
4 * AJAX handler plugin manager
5 *
6 * PHP version 8
7 *
8 * Copyright (C) Villanova University 2018.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2,
12 * as published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 *
23 * @category VuFind
24 * @package  AJAX
25 * @author   Demian Katz <demian.katz@villanova.edu>
26 * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
27 * @link     https://vufind.org/wiki/development Wiki
28 */
29
30namespace VuFind\AjaxHandler;
31
32/**
33 * AJAX handler plugin manager
34 *
35 * @category VuFind
36 * @package  AJAX
37 * @author   Demian Katz <demian.katz@villanova.edu>
38 * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
39 * @link     https://vufind.org/wiki/development Wiki
40 */
41class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager
42{
43    /**
44     * Default plugin aliases.
45     *
46     * @var array
47     */
48    protected $aliases = [
49        'checkRequestIsValid' => CheckRequestIsValid::class,
50        'commentRecord' => CommentRecord::class,
51        'deleteRecordComment' => DeleteRecordComment::class,
52        'doiLookup' => DoiLookup::class,
53        'getACSuggestions' => GetACSuggestions::class,
54        'getIlsStatus' => GetIlsStatus::class,
55        'getItemStatuses' => GetItemStatuses::class,
56        'getLibraryPickupLocations' => GetLibraryPickupLocations::class,
57        'getRecordCommentsAsHTML' => GetRecordCommentsAsHTML::class,
58        'getRecordCover' => GetRecordCover::class,
59        'getRecordDetails' => GetRecordDetails::class,
60        'getRecordRating' => GetRecordRating::class,
61        'getRecordTags' => GetRecordTags::class,
62        'getRecordVersions' => GetRecordVersions::class,
63        'getRequestGroupPickupLocations' => GetRequestGroupPickupLocations::class,
64        'getResolverLinks' => GetResolverLinks::class,
65        'getResultCount' => GetResultCount::class,
66        'getSaveStatuses' => GetSaveStatuses::class,
67        'getSearchResults' => GetSearchResults::class,
68        'getSideFacets' => GetSideFacets::class,
69        'getUserFines' => GetUserFines::class,
70        'getUserHolds' => GetUserHolds::class,
71        'getUserILLRequests' => GetUserILLRequests::class,
72        'getUserStorageRetrievalRequests' => GetUserStorageRetrievalRequests::class,
73        'getUserTransactions' => GetUserTransactions::class,
74        'getVisData' => GetVisData::class,
75        'keepAlive' => KeepAlive::class,
76        'recommend' => Recommend::class,
77        'relaisAvailability' => RelaisAvailability::class,
78        'relaisInfo' => RelaisInfo::class,
79        'relaisOrder' => RelaisOrder::class,
80        'systemStatus' => SystemStatus::class,
81        'tagRecord' => TagRecord::class,
82    ];
83
84    /**
85     * Default plugin factories.
86     *
87     * @var array
88     */
89    protected $factories = [
90        CheckRequestIsValid::class => AbstractIlsAndUserActionFactory::class,
91        CommentRecord::class => CommentRecordFactory::class,
92        DeleteRecordComment::class => DeleteRecordCommentFactory::class,
93        DoiLookup::class => DoiLookupFactory::class,
94        GetACSuggestions::class => GetACSuggestionsFactory::class,
95        GetIlsStatus::class => GetIlsStatusFactory::class,
96        GetItemStatuses::class => GetItemStatusesFactory::class,
97        GetLibraryPickupLocations::class => AbstractIlsAndUserActionFactory::class,
98        GetRecordCommentsAsHTML::class => GetRecordCommentsAsHTMLFactory::class,
99        GetRecordCover::class => GetRecordCoverFactory::class,
100        GetRecordDetails::class => GetRecordDetailsFactory::class,
101        GetRecordRating::class => GetRecordRatingFactory::class,
102        GetRecordTags::class => GetRecordTagsFactory::class,
103        GetRecordVersions::class => GetRecordVersionsFactory::class,
104        GetRequestGroupPickupLocations::class =>
105            AbstractIlsAndUserActionFactory::class,
106        GetResolverLinks::class => GetResolverLinksFactory::class,
107        GetResultCount::class => GetResultCountFactory::class,
108        GetSaveStatuses::class => GetSaveStatusesFactory::class,
109        GetSearchResults::class => GetSearchResultsFactory::class,
110        GetSideFacets::class => GetSideFacetsFactory::class,
111        GetUserFines::class => GetUserFinesFactory::class,
112        GetUserHolds::class => AbstractIlsAndUserActionFactory::class,
113        GetUserILLRequests::class => AbstractIlsAndUserActionFactory::class,
114        GetUserStorageRetrievalRequests::class =>
115            AbstractIlsAndUserActionFactory::class,
116        GetUserTransactions::class => AbstractIlsAndUserActionFactory::class,
117        GetVisData::class => GetVisDataFactory::class,
118        KeepAlive::class => KeepAliveFactory::class,
119        Recommend::class => RecommendFactory::class,
120        RelaisAvailability::class => AbstractRelaisActionFactory::class,
121        RelaisInfo::class =>  AbstractRelaisActionFactory::class,
122        RelaisOrder::class => AbstractRelaisActionFactory::class,
123        SystemStatus::class => SystemStatusFactory::class,
124        TagRecord::class => TagRecordFactory::class,
125    ];
126
127    /**
128     * Return the name of the base class or interface that plug-ins must conform
129     * to.
130     *
131     * @return string
132     */
133    protected function getExpectedInterface()
134    {
135        return AjaxHandlerInterface::class;
136    }
137}