VuFind API Documentation

Importer
in package
Uses GetServiceTrait

VuFind XSLT importer

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

$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
template

T

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
throws
Exception
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
throws
Exception
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
throws
Exception
Return values
object

XSLT processor.

Search results