VuFind API Documentation

PluginManager extends AbstractPluginManager
in package

Database row 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 = ['accesstoken' => \VuFind\Db\Row\AccessToken::class, 'changetracker' => \VuFind\Db\Row\ChangeTracker::class, 'comments' => \VuFind\Db\Row\Comments::class, 'externalsession' => \VuFind\Db\Row\ExternalSession::class, 'logintoken' => \VuFind\Db\Row\LoginToken::class, 'oairesumption' => \VuFind\Db\Row\OaiResumption::class, 'ratings' => \VuFind\Db\Row\Ratings::class, 'record' => \VuFind\Db\Row\Record::class, 'resource' => \VuFind\Db\Row\Resource::class, 'resourcetags' => \VuFind\Db\Row\ResourceTags::class, 'search' => \VuFind\Db\Row\Search::class, 'session' => \VuFind\Db\Row\Session::class, 'shortlinks' => \VuFind\Db\Row\Shortlinks::class, 'tags' => \VuFind\Db\Row\Tags::class, 'user' => \VuFind\Db\Row\User::class, 'usercard' => \VuFind\Db\Row\UserCard::class, 'userlist' => \VuFind\Db\Row\UserList::class, 'userresource' => \VuFind\Db\Row\UserResource::class]

$factories

Default plugin factories.

protected array<string|int, mixed> $factories = [\VuFind\Db\Row\AccessToken::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\AuthHash::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\ChangeTracker::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\Comments::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\ExternalSession::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\Feedback::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\LoginToken::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\OaiResumption::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\Ratings::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\Record::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\Resource::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\ResourceTags::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\Search::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\Session::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\Shortlinks::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\Tags::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\User::class => \VuFind\Db\Row\UserFactory::class, \VuFind\Db\Row\UserCard::class => \VuFind\Db\Row\RowGatewayFactory::class, \VuFind\Db\Row\UserList::class => \VuFind\Db\Row\UserListFactory::class, \VuFind\Db\Row\UserResource::class => \VuFind\Db\Row\RowGatewayFactory::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