VuFind API Documentation

PrimoBackendFactory extends AbstractBackendFactory
in package
Uses SharedListenersTrait

Factory for Primo Central backends.

Tags
category

VuFind

author

David Maus maus@hab.de

license

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

link

Main Site

Table of Contents

$backendClass  : string
Primo backend class
$connectorClass  : string
Primo legacy brief search connector class
$logger  : LoggerInterface
Logger.
$primoConfig  : Config
Primo configuration
$restConnectorClass  : string
Primo REST API connector class
$serviceLocator  : ContainerInterface
Service container.
__construct()  : mixed
Constructor
__invoke()  : Backend
Create service
setup()  : void
Initialize the factory
createBackend()  : Backend
Create the Primo Central backend.
createConnector()  : Connector
Create the Primo Central legacy brief search connector.
createConnectorCache()  : StorageInterface|null
Create cache for the connector if enabled in configuration
createHttpClient()  : Client
Create HTTP Client
createListeners()  : void
Create listeners.
createQueryBuilder()  : QueryBuilder
Create the Primo query builder.
createRecordCollectionFactory()  : RecordCollectionFactory
Create the record collection factory
createRestConnector()  : Connector
Create the Primo Central REST connector.
getHideFacetValueListener()  : mixed
Get a hide facet value listener for the backend
getHttpOptions()  : array<string|int, mixed>
Get HTTP options for the client
getInjectOnCampusListener()  : InjectOnCampusListener
Get a OnCampus Listener
getPermissionHandler()  : PrimoPermissionHandler|null
Get a PrimoPermissionHandler

Properties

$backendClass

Primo backend class

protected string $backendClass = \VuFindSearch\Backend\Primo\Backend::class

$connectorClass

Primo legacy brief search connector class

protected string $connectorClass = \VuFindSearch\Backend\Primo\Connector::class

$restConnectorClass

Primo REST API connector class

protected string $restConnectorClass = \VuFindSearch\Backend\Primo\RestConnector::class

Methods

__invoke()

Create service

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

Service manager

$name : string

Requested service name (unused)

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

Extra options (unused)

Tags
SuppressWarnings

(PHPMD.UnusedFormalParameter)

Return values
Backend

setup()

Initialize the factory

public setup(ContainerInterface $sm) : void
Parameters
$sm : ContainerInterface

Service manager

Return values
void

createConnectorCache()

Create cache for the connector if enabled in configuration

protected createConnectorCache(Config $searchConfig) : StorageInterface|null
Parameters
$searchConfig : Config

Search configuration

Return values
StorageInterface|null

createHttpClient()

Create HTTP Client

protected createHttpClient([int $timeout = null ][, array<string|int, mixed> $options = [] ][, string $url = null ]) : Client
Parameters
$timeout : int = null

Request timeout

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

Other options

$url : string = null

Request URL (needed for proper local address check when the client is being proxified)

Return values
Client

getHideFacetValueListener()

Get a hide facet value listener for the backend

protected getHideFacetValueListener(BackendInterface $backend, Config $facet) : mixed
Parameters
$backend : BackendInterface

Search backend

$facet : Config

Configuration of facets

Return values
mixed

null|HideFacetValueListener

getHttpOptions()

Get HTTP options for the client

protected getHttpOptions(string $url) : array<string|int, mixed>
Parameters
$url : string

URL being requested

Tags
SuppressWarnings

(PHPMD.UnusedFormalParameter)

Return values
array<string|int, mixed>

Search results