Importer
in package
Uses
GetServiceTrait
VuFind XSLT importer
Tags
Table of Contents
- $serviceLocator : ContainerInterface
- Service manager
- __construct() : mixed
- Constructor
- getService() : T
- Retrieve a service
- save() : string
- Save an XML file to the Solr index using the specified configuration.
- generateXML() : mixed
- Transform $xmlFile using the provided $properties configuration.
- initProcessor() : object
- Initialize an XSLT processor using settings from the user-specified properties file.
Properties
$serviceLocator
Service manager
protected
ContainerInterface
$serviceLocator
Methods
__construct()
Constructor
public
__construct(ServiceLocatorInterface $sm) : mixed
Parameters
- $sm : ServiceLocatorInterface
-
Service manager
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 —save()
Save an XML file to the Solr index using the specified configuration.
public
save(string $xmlFile, string $properties[, string $index = 'Solr' ][, bool $testMode = false ]) : string
Parameters
- $xmlFile : string
-
XML file to transform.
- $properties : string
-
Properties file.
- $index : string = 'Solr'
-
Solr index to use.
- $testMode : bool = false
-
Are we in test-only mode?
Tags
Return values
string —Transformed XML
generateXML()
Transform $xmlFile using the provided $properties configuration.
protected
generateXML(string $xmlFile, string $properties) : mixed
Parameters
- $xmlFile : string
-
XML file to transform.
- $properties : string
-
Properties file.
Tags
Return values
mixed —Transformed XML.
initProcessor()
Initialize an XSLT processor using settings from the user-specified properties file.
protected
initProcessor(array<string|int, mixed> $options) : object
Parameters
- $options : array<string|int, mixed>
-
Parsed contents of properties file.
Tags
Return values
object —XSLT processor.