VuFind API Documentation

PluginManager extends AbstractPluginManager
in package

ILS driver plugin manager

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

$aliases  : array<string|int, mixed>
Default plugin aliases.
$factories  : array<string|int, mixed>
Default plugin factories.
__construct()  : mixed
Constructor
get()  : mixed
Retrieve a plugin
has()  : bool
Returns true if the container can return an entry for the given identifier.
validate()  : void
Validate the plugin
getExpectedInterface()  : string
Return the name of the base class or interface that plug-ins must conform to.
getNormalizedServiceName()  : string
Hack for backward compatibility with services defined under ServiceManager v2, when service names were case-insensitive.

Properties

$aliases

Default plugin aliases.

protected array<string|int, mixed> $aliases = ['aleph' => \VuFind\ILS\Driver\Aleph::class, 'alma' => \VuFind\ILS\Driver\Alma::class, 'amicus' => \VuFind\ILS\Driver\Amicus::class, 'composeddriver' => \VuFind\ILS\Driver\ComposedDriver::class, 'daia' => \VuFind\ILS\Driver\DAIA::class, 'demo' => \VuFind\ILS\Driver\Demo::class, 'evergreen' => \VuFind\ILS\Driver\Evergreen::class, 'folio' => \VuFind\ILS\Driver\Folio::class, 'genieplus' => \VuFind\ILS\Driver\GeniePlus::class, 'horizon' => \VuFind\ILS\Driver\Horizon::class, 'horizonxmlapi' => \VuFind\ILS\Driver\HorizonXMLAPI::class, 'innovative' => \VuFind\ILS\Driver\Innovative::class, 'koha' => \VuFind\ILS\Driver\Koha::class, 'kohailsdi' => \VuFind\ILS\Driver\KohaILSDI::class, 'koharest' => \VuFind\ILS\Driver\KohaRest::class, 'multibackend' => \VuFind\ILS\Driver\MultiBackend::class, 'newgenlib' => \VuFind\ILS\Driver\NewGenLib::class, 'noils' => \VuFind\ILS\Driver\NoILS::class, 'paia' => \VuFind\ILS\Driver\PAIA::class, 'polaris' => \VuFind\ILS\Driver\Polaris::class, 'sample' => \VuFind\ILS\Driver\Sample::class, 'sierrarest' => \VuFind\ILS\Driver\SierraRest::class, 'symphony' => \VuFind\ILS\Driver\Symphony::class, 'unicorn' => \VuFind\ILS\Driver\Unicorn::class, 'virtua' => \VuFind\ILS\Driver\Virtua::class, 'voyager' => \VuFind\ILS\Driver\Voyager::class, 'voyagerrestful' => \VuFind\ILS\Driver\VoyagerRestful::class, 'xcncip2' => \VuFind\ILS\Driver\XCNCIP2::class]

$factories

Default plugin factories.

protected array<string|int, mixed> $factories = [\VuFind\ILS\Driver\Aleph::class => \VuFind\ILS\Driver\AlephFactory::class, \VuFind\ILS\Driver\Alma::class => \VuFind\ILS\Driver\DriverWithDateConverterFactory::class, \VuFind\ILS\Driver\Amicus::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFind\ILS\Driver\ComposedDriver::class => \VuFind\ILS\Driver\AbstractMultiDriverFactory::class, \VuFind\ILS\Driver\DAIA::class => \VuFind\ILS\Driver\DriverWithDateConverterFactory::class, \VuFind\ILS\Driver\Demo::class => \VuFind\ILS\Driver\DemoFactory::class, \VuFind\ILS\Driver\Evergreen::class => \VuFind\ILS\Driver\DriverWithDateConverterFactory::class, \VuFind\ILS\Driver\Folio::class => \VuFind\ILS\Driver\FolioFactory::class, \VuFind\ILS\Driver\GeniePlus::class => \VuFind\ILS\Driver\GeniePlusFactory::class, \VuFind\ILS\Driver\Horizon::class => \VuFind\ILS\Driver\DriverWithDateConverterFactory::class, \VuFind\ILS\Driver\HorizonXMLAPI::class => \VuFind\ILS\Driver\DriverWithDateConverterFactory::class, \VuFind\ILS\Driver\Innovative::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFind\ILS\Driver\Koha::class => \VuFind\ILS\Driver\DriverWithDateConverterFactory::class, \VuFind\ILS\Driver\KohaILSDI::class => \VuFind\ILS\Driver\DriverWithDateConverterFactory::class, \VuFind\ILS\Driver\KohaRest::class => \VuFind\ILS\Driver\KohaRestFactory::class, \VuFind\ILS\Driver\MultiBackend::class => \VuFind\ILS\Driver\MultiBackendFactory::class, \VuFind\ILS\Driver\NewGenLib::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFind\ILS\Driver\NoILS::class => \VuFind\ILS\Driver\NoILSFactory::class, \VuFind\ILS\Driver\PAIA::class => \VuFind\ILS\Driver\PAIAFactory::class, \VuFind\ILS\Driver\Polaris::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFind\ILS\Driver\Sample::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFind\ILS\Driver\SierraRest::class => \VuFind\ILS\Driver\SierraRestFactory::class, \VuFind\ILS\Driver\Symphony::class => \VuFind\ILS\Driver\SymphonyFactory::class, \VuFind\ILS\Driver\Unicorn::class => \VuFind\ILS\Driver\UnicornFactory::class, \VuFind\ILS\Driver\Virtua::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFind\ILS\Driver\Voyager::class => \VuFind\ILS\Driver\DriverWithDateConverterFactory::class, \VuFind\ILS\Driver\VoyagerRestful::class => \VuFind\ILS\Driver\VoyagerRestfulFactory::class, \VuFind\ILS\Driver\XCNCIP2::class => \VuFind\ILS\Driver\XCNCIP2Factory::class]

Methods

__construct()

Constructor

public __construct([mixed $configOrContainerInstance = null ][, array<string|int, mixed> $v3config = [] ]) : mixed

Make sure plugins are properly initialized.

Parameters
$configOrContainerInstance : mixed = null

Configuration or container instance

$v3config : array<string|int, mixed> = []

If $configOrContainerInstance is a container, this value will be passed to the parent constructor.

Return values
mixed

get()

Retrieve a plugin

public get(string $name[, null|array<string|int, mixed> $options = null ]) : mixed
Parameters
$name : string

Name of plugin

$options : null|array<string|int, mixed> = null

Options to use when creating the instance.

Return values
mixed

has()

Returns true if the container can return an entry for the given identifier.

public has(string $id) : bool

Returns false otherwise.

Parameters
$id : string

Identifier of the entry to look for.

Return values
bool

validate()

Validate the plugin

public validate(mixed $plugin) : void

Checks that the filter loaded is either a valid callback or an instance of FilterInterface.

Parameters
$plugin : mixed

Plugin to validate

Tags
throws
InvalidServiceException

if invalid

Return values
void

getExpectedInterface()

Return the name of the base class or interface that plug-ins must conform to.

protected getExpectedInterface() : string
Return values
string

getNormalizedServiceName()

Hack for backward compatibility with services defined under ServiceManager v2, when service names were case-insensitive.

protected getNormalizedServiceName(string $name) : string

TODO: set up aliases and/or normalize code to eliminate the need for this.

Parameters
$name : string

Service name

Return values
string

Search results