Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
PluginManager
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 getExpectedInterface
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/**
4 * Covers content loader plugin manager
5 *
6 * PHP version 8
7 *
8 * Copyright (C) Villanova University 2010.
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  Content
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:plugins:hierarchy_components Wiki
28 */
29
30namespace VuFind\Content\Covers;
31
32use Laminas\ServiceManager\Factory\InvokableFactory;
33use VuFind\Content\ObalkyKnihContentFactory;
34
35/**
36 * Covers content loader plugin manager
37 *
38 * @category VuFind
39 * @package  Content
40 * @author   Demian Katz <demian.katz@villanova.edu>
41 * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
42 * @link     https://vufind.org/wiki/development:plugins:hierarchy_components Wiki
43 */
44class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager
45{
46    /**
47     * Default plugin aliases.
48     *
49     * @var array
50     */
51    protected $aliases = [
52        Amazon::class => Deprecated::class,
53        'amazon' => Deprecated::class,
54        'bokinfo' => Bokinfo::class,
55        'booksite' => Booksite::class,
56        'buchhandel' => Buchhandel::class,
57        'browzine' => BrowZine::class,
58        'contentcafe' => ContentCafe::class,
59        'google' => Google::class,
60        'koha' => Koha::class,
61        'librarything' => LibraryThing::class,
62        'localfile' => LocalFile::class,
63        'obalkyknih' => ObalkyKnih::class,
64        'openlibrary' => OpenLibrary::class,
65        'orb' => Orb::class,
66        'summon' => Summon::class,
67        'syndetics' => Syndetics::class,
68    ];
69
70    /**
71     * Default plugin factories.
72     *
73     * @var array
74     */
75    protected $factories = [
76        Amazon::class => AmazonFactory::class,
77        Bokinfo::class => InvokableFactory::class,
78        Booksite::class => BooksiteFactory::class,
79        BrowZine::class => BrowZineFactory::class,
80        Buchhandel::class => BuchhandelFactory::class,
81        ContentCafe::class => ContentCafeFactory::class,
82        Deprecated::class => InvokableFactory::class,
83        Google::class => GoogleFactory::class,
84        Koha::class => KohaFactory::class,
85        LibraryThing::class => InvokableFactory::class,
86        LocalFile::class => InvokableFactory::class,
87        ObalkyKnih::class => ObalkyKnihContentFactory::class,
88        OpenLibrary::class => InvokableFactory::class,
89        Orb::class => OrbFactory::class,
90        Summon::class => InvokableFactory::class,
91        Syndetics::class => SyndeticsFactory::class,
92    ];
93
94    /**
95     * Return the name of the base class or interface that plug-ins must conform
96     * to.
97     *
98     * @return string
99     */
100    protected function getExpectedInterface()
101    {
102        return \VuFind\Content\AbstractCover::class;
103    }
104}