VuFind API Documentation

PluginManager extends AbstractPluginManager
in package

Console command 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
getCommandList()  : array<string|int, mixed>
Get a list of all available commands in the plugin manager.
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 = ['compile/theme' => \VuFindConsole\Command\Compile\ThemeCommand::class, 'generate/dynamicroute' => \VuFindConsole\Command\Generate\DynamicRouteCommand::class, 'generate/extendclass' => \VuFindConsole\Command\Generate\ExtendClassCommand::class, 'generate/extendservice' => \VuFindConsole\Command\Generate\ExtendServiceCommand::class, 'generate/nontabrecordaction' => \VuFindConsole\Command\Generate\NonTabRecordActionCommand::class, 'generate/plugin' => \VuFindConsole\Command\Generate\PluginCommand::class, 'generate/recordroute' => \VuFindConsole\Command\Generate\RecordRouteCommand::class, 'generate/staticroute' => \VuFindConsole\Command\Generate\StaticRouteCommand::class, 'generate/theme' => \VuFindConsole\Command\Generate\ThemeCommand::class, 'generate/thememixin' => \VuFindConsole\Command\Generate\ThemeMixinCommand::class, 'harvest/harvest_oai' => \VuFindConsole\Command\Harvest\HarvestOaiCommand::class, 'harvest/merge-marc' => \VuFindConsole\Command\Harvest\MergeMarcCommand::class, 'import/import-csv' => \VuFindConsole\Command\Import\ImportCsvCommand::class, 'import/import-xsl' => \VuFindConsole\Command\Import\ImportXslCommand::class, 'import/webcrawl' => \VuFindConsole\Command\Import\WebCrawlCommand::class, 'install/install' => \VuFindConsole\Command\Install\InstallCommand::class, 'language/addusingtemplate' => \VuFindConsole\Command\Language\AddUsingTemplateCommand::class, 'language/copystring' => \VuFindConsole\Command\Language\CopyStringCommand::class, 'language/delete' => \VuFindConsole\Command\Language\DeleteCommand::class, 'language/importlokalise' => \VuFindConsole\Command\Language\ImportLokaliseCommand::class, 'language/normalize' => \VuFindConsole\Command\Language\NormalizeCommand::class, 'scheduledsearch/notify' => \VuFindConsole\Command\ScheduledSearch\NotifyCommand::class, 'util/browscap' => \VuFindConsole\Command\Util\BrowscapCommand::class, 'util/cleanuprecordcache' => \VuFindConsole\Command\Util\CleanUpRecordCacheCommand::class, 'util/cleanup_record_cache' => \VuFindConsole\Command\Util\CleanUpRecordCacheCommand::class, 'util/commit' => \VuFindConsole\Command\Util\CommitCommand::class, 'util/createHierarchyTrees' => \VuFindConsole\Command\Util\CreateHierarchyTreesCommand::class, 'util/dedupe' => \VuFindConsole\Command\Util\DedupeCommand::class, 'util/deletes' => \VuFindConsole\Command\Util\DeletesCommand::class, 'util/expire_access_tokens' => \VuFindConsole\Command\Util\ExpireAccessTokensCommand::class, 'util/expire_auth_hashes' => \VuFindConsole\Command\Util\ExpireAuthHashesCommand::class, 'util/expire_external_sessions' => \VuFindConsole\Command\Util\ExpireExternalSessionsCommand::class, 'util/expire_login_tokens' => \VuFindConsole\Command\Util\ExpireLoginTokensCommand::class, 'util/expire_searches' => \VuFindConsole\Command\Util\ExpireSearchesCommand::class, 'util/expire_sessions' => \VuFindConsole\Command\Util\ExpireSessionsCommand::class, 'util/index_reserves' => \VuFindConsole\Command\Util\IndexReservesCommand::class, 'util/lint_marc' => \VuFindConsole\Command\Util\LintMarcCommand::class, 'util/optimize' => \VuFindConsole\Command\Util\OptimizeCommand::class, 'util/purge_cached_record' => \VuFindConsole\Command\Util\PurgeCachedRecordCommand::class, 'util/scssBuilder' => \VuFindConsole\Command\Util\ScssBuilderCommand::class, 'util/sitemap' => \VuFindConsole\Command\Util\SitemapCommand::class, 'util/suppressed' => \VuFindConsole\Command\Util\SuppressedCommand::class, 'util/switch_db_hash' => \VuFindConsole\Command\Util\SwitchDbHashCommand::class]

$factories

Default plugin factories.

protected array<string|int, mixed> $factories = [\VuFindConsole\Command\Compile\ThemeCommand::class => \VuFindConsole\Command\Compile\ThemeCommandFactory::class, \VuFindConsole\Command\Generate\DynamicRouteCommand::class => \VuFindConsole\Command\Generate\AbstractRouteCommandFactory::class, \VuFindConsole\Command\Generate\ExtendClassCommand::class => \VuFindConsole\Command\Generate\AbstractContainerAwareCommandFactory::class, \VuFindConsole\Command\Generate\ExtendServiceCommand::class => \VuFindConsole\Command\Generate\AbstractCommandFactory::class, \VuFindConsole\Command\Generate\NonTabRecordActionCommand::class => \VuFindConsole\Command\Generate\NonTabRecordActionCommandFactory::class, \VuFindConsole\Command\Generate\PluginCommand::class => \VuFindConsole\Command\Generate\AbstractContainerAwareCommandFactory::class, \VuFindConsole\Command\Generate\RecordRouteCommand::class => \VuFindConsole\Command\Generate\AbstractRouteCommandFactory::class, \VuFindConsole\Command\Generate\StaticRouteCommand::class => \VuFindConsole\Command\Generate\AbstractRouteCommandFactory::class, \VuFindConsole\Command\Generate\ThemeCommand::class => \VuFindConsole\Command\Generate\ThemeCommandFactory::class, \VuFindConsole\Command\Generate\ThemeMixinCommand::class => \VuFindConsole\Command\Generate\ThemeMixinCommandFactory::class, \VuFindConsole\Command\Harvest\MergeMarcCommand::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFindConsole\Command\Harvest\HarvestOaiCommand::class => \VuFindConsole\Command\Harvest\HarvestOaiCommandFactory::class, \VuFindConsole\Command\Import\ImportCsvCommand::class => \VuFindConsole\Command\Import\ImportCsvCommandFactory::class, \VuFindConsole\Command\Import\ImportXslCommand::class => \VuFindConsole\Command\Import\ImportXslCommandFactory::class, \VuFindConsole\Command\Import\WebCrawlCommand::class => \VuFindConsole\Command\Import\WebCrawlCommandFactory::class, \VuFindConsole\Command\Install\InstallCommand::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFindConsole\Command\Language\AddUsingTemplateCommand::class => \VuFindConsole\Command\Language\AbstractCommandFactory::class, \VuFindConsole\Command\Language\CopyStringCommand::class => \VuFindConsole\Command\Language\AbstractCommandFactory::class, \VuFindConsole\Command\Language\DeleteCommand::class => \VuFindConsole\Command\Language\AbstractCommandFactory::class, \VuFindConsole\Command\Language\ImportLokaliseCommand::class => \VuFindConsole\Command\Language\AbstractCommandFactory::class, \VuFindConsole\Command\Language\NormalizeCommand::class => \VuFindConsole\Command\Language\AbstractCommandFactory::class, \VuFindConsole\Command\ScheduledSearch\NotifyCommand::class => \VuFindConsole\Command\ScheduledSearch\NotifyCommandFactory::class, \VuFindConsole\Command\Util\BrowscapCommand::class => \VuFindConsole\Command\Util\BrowscapCommandFactory::class, \VuFindConsole\Command\Util\CleanUpRecordCacheCommand::class => \VuFindConsole\Command\Util\CleanUpRecordCacheCommandFactory::class, \VuFindConsole\Command\Util\CommitCommand::class => \VuFindConsole\Command\Util\AbstractSolrCommandFactory::class, \VuFindConsole\Command\Util\CreateHierarchyTreesCommand::class => \VuFindConsole\Command\Util\CreateHierarchyTreesCommandFactory::class, \VuFindConsole\Command\Util\DedupeCommand::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFindConsole\Command\Util\DeletesCommand::class => \VuFindConsole\Command\Util\AbstractSolrCommandFactory::class, \VuFindConsole\Command\Util\ExpireAccessTokensCommand::class => \VuFindConsole\Command\Util\ExpireAccessTokensCommandFactory::class, \VuFindConsole\Command\Util\ExpireAuthHashesCommand::class => \VuFindConsole\Command\Util\ExpireAuthHashesCommandFactory::class, \VuFindConsole\Command\Util\ExpireExternalSessionsCommand::class => \VuFindConsole\Command\Util\ExpireExternalSessionsCommandFactory::class, \VuFindConsole\Command\Util\ExpireLoginTokensCommand::class => \VuFindConsole\Command\Util\ExpireLoginTokensCommandFactory::class, \VuFindConsole\Command\Util\ExpireSearchesCommand::class => \VuFindConsole\Command\Util\ExpireSearchesCommandFactory::class, \VuFindConsole\Command\Util\ExpireSessionsCommand::class => \VuFindConsole\Command\Util\ExpireSessionsCommandFactory::class, \VuFindConsole\Command\Util\IndexReservesCommand::class => \VuFindConsole\Command\Util\AbstractSolrAndIlsCommandFactory::class, \VuFindConsole\Command\Util\LintMarcCommand::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, \VuFindConsole\Command\Util\OptimizeCommand::class => \VuFindConsole\Command\Util\AbstractSolrCommandFactory::class, \VuFindConsole\Command\Util\PurgeCachedRecordCommand::class => \VuFindConsole\Command\Util\PurgeCachedRecordCommandFactory::class, \VuFindConsole\Command\Util\ScssBuilderCommand::class => \VuFindConsole\Command\Util\ScssBuilderCommandFactory::class, \VuFindConsole\Command\Util\SitemapCommand::class => \VuFindConsole\Command\Util\SitemapCommandFactory::class, \VuFindConsole\Command\Util\SuppressedCommand::class => \VuFindConsole\Command\Util\AbstractSolrAndIlsCommandFactory::class, \VuFindConsole\Command\Util\SwitchDbHashCommand::class => \VuFindConsole\Command\Util\SwitchDbHashCommandFactory::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

getCommandList()

Get a list of all available commands in the plugin manager.

public getCommandList() : array<string|int, mixed>
Return values
array<string|int, 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