PluginManager
extends AbstractPluginManager
in package
Record tab plugin manager
Tags
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
= ['collectionhierarchytree' => \VuFind\RecordTab\CollectionHierarchyTree::class, 'collectionlist' => \VuFind\RecordTab\CollectionList::class, 'componentparts' => \VuFind\RecordTab\ComponentParts::class, 'description' => \VuFind\RecordTab\Description::class, 'excerpt' => \VuFind\RecordTab\Excerpt::class, 'formats' => \VuFind\RecordTab\Formats::class, 'hierarchytree' => \VuFind\RecordTab\HierarchyTree::class, 'holdingsils' => \VuFind\RecordTab\HoldingsILS::class, 'holdingsworldcat' => \VuFind\RecordTab\HoldingsWorldCat::class, 'map' => \VuFind\RecordTab\Map::class, 'preview' => \VuFind\RecordTab\Preview::class, 'reviews' => \VuFind\RecordTab\Reviews::class, 'search2collectionlist' => \VuFind\RecordTab\Search2CollectionList::class, 'similaritemscarousel' => \VuFind\RecordTab\SimilarItemsCarousel::class, 'staffviewarray' => \VuFind\RecordTab\StaffViewArray::class, 'staffviewmarc' => \VuFind\RecordTab\StaffViewMARC::class, 'staffviewoverdrive' => \VuFind\RecordTab\StaffViewOverdrive::class, 'toc' => \VuFind\RecordTab\TOC::class, 'usercomments' => \VuFind\RecordTab\UserComments::class, 'versions' => \VuFind\RecordTab\Versions::class]
$factories
Default plugin factories.
protected
array<string|int, mixed>
$factories
= [\VuFind\RecordTab\CollectionHierarchyTree::class => \VuFind\RecordTab\CollectionHierarchyTreeFactory::class, \VuFind\RecordTab\CollectionList::class => \VuFind\RecordTab\CollectionListFactory::class, \VuFind\RecordTab\ComponentParts::class => \VuFind\RecordTab\ComponentPartsFactory::class, \VuFind\RecordTab\Description::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFind\RecordTab\Excerpt::class => \VuFind\RecordTab\ExcerptFactory::class, \VuFind\RecordTab\Formats::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFind\RecordTab\HierarchyTree::class => \VuFind\RecordTab\HierarchyTreeFactory::class, \VuFind\RecordTab\HoldingsILS::class => \VuFind\RecordTab\HoldingsILSFactory::class, \VuFind\RecordTab\HoldingsWorldCat::class => \VuFind\RecordTab\HoldingsWorldCatFactory::class, \VuFind\RecordTab\Map::class => \VuFind\RecordTab\MapFactory::class, \VuFind\RecordTab\OverdriveHoldings::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFind\RecordTab\Preview::class => \VuFind\RecordTab\PreviewFactory::class, \VuFind\RecordTab\Reviews::class => \VuFind\RecordTab\ReviewsFactory::class, \VuFind\RecordTab\Search2CollectionList::class => \VuFind\RecordTab\CollectionListFactory::class, \VuFind\RecordTab\SimilarItemsCarousel::class => \VuFind\RecordTab\SimilarItemsCarouselFactory::class, \VuFind\RecordTab\StaffViewArray::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFind\RecordTab\StaffViewMARC::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFind\RecordTab\StaffViewOverdrive::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFind\RecordTab\TOC::class => \VuFind\RecordTab\TOCFactory::class, \VuFind\RecordTab\UserComments::class => \VuFind\RecordTab\UserCommentsFactory::class, \VuFind\RecordTab\Versions::class => \VuFind\RecordTab\VersionsFactory::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
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