VuFind API Documentation

PluginManager extends AbstractPluginManager
in package

Database service 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 = [\VuFind\Db\Service\AccessTokenServiceInterface::class => \VuFind\Db\Service\AccessTokenService::class, \VuFind\Db\Service\AuthHashServiceInterface::class => \VuFind\Db\Service\AuthHashService::class, \VuFind\Db\Service\ChangeTrackerServiceInterface::class => \VuFind\Db\Service\ChangeTrackerService::class, \VuFind\Db\Service\CommentsServiceInterface::class => \VuFind\Db\Service\CommentsService::class, \VuFind\Db\Service\ExternalSessionServiceInterface::class => \VuFind\Db\Service\ExternalSessionService::class, \VuFind\Db\Service\FeedbackServiceInterface::class => \VuFind\Db\Service\FeedbackService::class, \VuFind\Db\Service\LoginTokenServiceInterface::class => \VuFind\Db\Service\LoginTokenService::class, \VuFind\Db\Service\OaiResumptionServiceInterface::class => \VuFind\Db\Service\OaiResumptionService::class, \VuFind\Db\Service\RatingsServiceInterface::class => \VuFind\Db\Service\RatingsService::class, \VuFind\Db\Service\RecordServiceInterface::class => \VuFind\Db\Service\RecordService::class, \VuFind\Db\Service\ResourceServiceInterface::class => \VuFind\Db\Service\ResourceService::class, \VuFind\Db\Service\ResourceTagsServiceInterface::class => \VuFind\Db\Service\ResourceTagsService::class, \VuFind\Db\Service\SearchServiceInterface::class => \VuFind\Db\Service\SearchService::class, \VuFind\Db\Service\SessionServiceInterface::class => \VuFind\Db\Service\SessionService::class, \VuFind\Db\Service\ShortlinksServiceInterface::class => \VuFind\Db\Service\ShortlinksService::class, \VuFind\Db\Service\TagServiceInterface::class => \VuFind\Db\Service\TagService::class, \VuFind\Db\Service\UserCardServiceInterface::class => \VuFind\Db\Service\UserCardService::class, \VuFind\Db\Service\UserListServiceInterface::class => \VuFind\Db\Service\UserListService::class, \VuFind\Db\Service\UserResourceServiceInterface::class => \VuFind\Db\Service\UserResourceService::class, \VuFind\Db\Service\UserServiceInterface::class => \VuFind\Db\Service\UserService::class, \VuFind\Auth\UserSessionPersistenceInterface::class => \VuFind\Db\Service\UserService::class]

$factories

Default plugin factories.

protected array<string|int, mixed> $factories = [\VuFind\Db\Service\AccessTokenService::class => \VuFind\Db\Service\AccessTokenServiceFactory::class, \VuFind\Db\Service\AuthHashService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\ChangeTrackerService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\CommentsService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\ExternalSessionService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\FeedbackService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\LoginTokenService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\OaiResumptionService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\RatingsService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\RecordService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\ResourceService::class => \VuFind\Db\Service\ResourceServiceFactory::class, \VuFind\Db\Service\ResourceTagsService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\SearchService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\SessionService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\ShortlinksService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\TagService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\UserCardService::class => \VuFind\Db\Service\UserCardServiceFactory::class, \VuFind\Db\Service\UserListService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\UserResourceService::class => \VuFind\Db\Service\AbstractDbServiceFactory::class, \VuFind\Db\Service\UserService::class => \VuFind\Db\Service\UserServiceFactory::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