AbstractBackendFactory
in package
implements
FactoryInterface
Uses
GetServiceTrait
Abstract factory for backends.
Tags
Interfaces, Classes, Traits and Enums
- FactoryInterface
Table of Contents
- $serviceLocator : ContainerInterface
- Service manager
- __construct() : mixed
- Constructor
- getService() : T
- Retrieve a service
- setup() : void
- Initialize the factory
- createConnectorCache() : StorageInterface|null
- Create cache for the connector if enabled in configuration
- createHttpClient() : Client
- Create HTTP Client
Properties
$serviceLocator
Service manager
protected
ContainerInterface
$serviceLocator
Methods
__construct()
Constructor
public
__construct() : mixed
Return values
mixed —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 —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)