Koha::Illrequest::Config - Koha ILL Configuration Object
Object-oriented class that giving access to the illconfig data derived from ill/config.yaml.
Config object providing abstract representation of the expected XML returned by ILL API.
In particular the config object uses a YAML file, whose path is defined by <illconfig> in koha-conf.xml. That YAML file provides the data structure exposed in this object.
By default the configured data structure complies with fields used by the British Library Interlibrary Loan DSS API.
The config file also provides mappings for Record Object accessors.
my $config = Koha::Illrequest::Config->new();
Create a new Koha::Illrequest::Config object, with mapping data loaded from the ILL configuration file.
$backend = $config->backend($name); $backend = $config->backend;
Standard setter/accessor for our backend.
$backend_dir = $config->backend_dir($new_path); $backend_dir = $config->backend_dir;
Standard setter/accessor for our backend_directory.
Return a list of available backends.
Return whether a 'branch' block is defined
$partner_code = $config->partner_code($new_code); $partner_code = $config->partner_code;
Standard setter/accessor for our partner_code.
$limits = $config->limits($limitshash); $limits = $config->limits;
Standard setter/accessor for our limits. No parsing is performed on $LIMITSHASH, so caution should be exercised when using this setter.
my $prefixes = $config->getPrefixes();
Return the branch prefix for ILLs defined by our config.
my $rules = $config->getLimitRules('brw_cat' | 'branch')
Return the hash of ILL limit rules defined by our config.
my $recipient_rules= $config->getDigitalRecipients('brw_cat' | 'branch');
Return the hash of digital_recipient settings defined by our config.
my $censoredValues = $config->censorship($hash); my $censoredValues = $config->censorship;
Standard setter/accessor for our limits. No parsing is performed on $HASH, so caution should be exercised when using this setter.
Return our censorship values for the OPAC as loaded from the koha-conf.xml, or the fallback value (no censorship).
my $configuration = $config->_load_configuration($config_from_xml);
Read the configuration values passed as the parameter, and populate a hashref suitable for use with these.
A key task performed here is the parsing of the input in the configuration file to ensure we have only valid input there.
my $configuration->{part} = _load_unit_config($params);
$PARAMS is a hashref with the following elements: - unit: the part of the configuration we are parsing. - id: the name within which we will store the parsed unit in config. - config: the configuration we are augmenting. - type: the type of config unit we are parsing. Assumed to be 'default'.
Read `unit', and augment `config' with these under `id'.
This is a helper for _load_configuration.
A key task performed here is the parsing of the input in the configuration file to ensure we have only valid input there.
Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>