PrimoBackendFactory
extends AbstractBackendFactory
in package
Uses
SharedListenersTrait
Factory for Primo Central backends.
Tags
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 manager
- __construct() : mixed
- Constructor
- __invoke() : Backend
- Create service
- getService() : T
- Retrieve a 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
$logger
Logger.
protected
LoggerInterface
$logger
$primoConfig
Primo configuration
protected
Config
$primoConfig
$restConnectorClass
Primo REST API connector class
protected
string
$restConnectorClass
= \VuFindSearch\Backend\Primo\RestConnector::class
$serviceLocator
Service manager
protected
ContainerInterface
$serviceLocator
Methods
__construct()
Constructor
public
__construct() : mixed
Return values
mixed —__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
Return values
Backend —getService()
Retrieve a service
public
getService(class-string<\VuFind\Service\T> $name) : T
Parameters
- $name : class-string<\VuFind\Service\T>
-
Name of service to retrieve
Tags
Return values
T —setup()
Initialize the factory
public
setup(ContainerInterface $sm) : void
Parameters
- $sm : ContainerInterface
-
Service manager
Return values
void —createBackend()
Create the Primo Central backend.
protected
createBackend(ConnectorInterface $connector) : Backend
Parameters
- $connector : ConnectorInterface
-
Connector
Return values
Backend —createConnector()
Create the Primo Central legacy brief search connector.
protected
createConnector() : Connector
Return values
Connector —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 —createListeners()
Create listeners.
protected
createListeners(Backend $backend) : void
Parameters
- $backend : Backend
-
Backend
Return values
void —createQueryBuilder()
Create the Primo query builder.
protected
createQueryBuilder() : QueryBuilder
Return values
QueryBuilder —createRecordCollectionFactory()
Create the record collection factory
protected
createRecordCollectionFactory() : RecordCollectionFactory
Return values
RecordCollectionFactory —createRestConnector()
Create the Primo Central REST connector.
protected
createRestConnector() : Connector
Return values
Connector —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
Return values
array<string|int, mixed> —getInjectOnCampusListener()
Get a OnCampus Listener
protected
getInjectOnCampusListener() : InjectOnCampusListener
Return values
InjectOnCampusListener —getPermissionHandler()
Get a PrimoPermissionHandler
protected
getPermissionHandler() : PrimoPermissionHandler|null