Warning: This page has not been updated in over over a year and may be outdated or deprecated.
development:plugins:link_resolver_drivers
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
vufind2:link_resolver_drivers [2012/09/10 19:48] – created demiankatz | development:plugins:link_resolver_drivers [2023/11/27 18:48] (current) – [parseLinks] demiankatz | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Link Resolver | + | ====== Link Resolver |
- | // This page refers to VuFind 2.0 functionality; | + | This page contains details on writing a custom driver |
- | This page contains details on writing | + | Note that Link Resolver Drivers are only used when the " |
- | Note that Link Resolver | + | ===== Key Plugin Details ===== |
+ | |||
+ | **Default Namespace: | ||
+ | |||
+ | **Interface: | ||
+ | |||
+ | **Service Locator Configuration Section in module.config.php:** [' | ||
+ | |||
+ | **Service Manager Name for Service Locator:** VuFind\ResolverDriverPluginManager (VuFind® 2.x-4.x), | ||
+ | |||
+ | See the [[development: | ||
===== Basic Structure ===== | ===== Basic Structure ===== | ||
- | | + | * The PHP driver |
- | | + | * The driver |
- | * The name of the class defined in the PHP file should be the resolver setting, capitalized and prefixed with " | + | |
- | * The class must implement the ResolverInterface (found in web/sys/Resolver/Interface.php). | + | |
===== Key Methods ===== | ===== Key Methods ===== | ||
Line 19: | Line 27: | ||
This method takes an OpenURL as a parameter and retrieves details from the link resolver. | This method takes an OpenURL as a parameter and retrieves details from the link resolver. | ||
+ | |||
+ | ==== getResolverUrl ==== | ||
+ | |||
+ | :!: Introduced in VuFind® 4.0 | ||
+ | |||
+ | This method takes an OpenURL as a parameter and returns a URL for accessing that item in the link resolver' | ||
==== parseLinks ==== | ==== parseLinks ==== | ||
- | This method takes the output of fetchLinks and parses it into an associative | + | This method takes the output of fetchLinks and parses it into an array of associative arrays |
* href - the link to access the resource | * href - the link to access the resource | ||
Line 28: | Line 42: | ||
* coverage - coverage range applicable to the resource | * coverage - coverage range applicable to the resource | ||
* service_type - used to categorize links (getHolding = local print holding, getWebService = special service related to item, getDOI = DOI link, getFullTxt = electronic holding) | * service_type - used to categorize links (getHolding = local print holding, getWebService = special service related to item, getDOI = DOI link, getFullTxt = electronic holding) | ||
+ | * access - used to style links according to their access-status (if supported by the link resolver driver - available status: open, limited, denied, unknown), style classes are named access-{status} in template ajax/ | ||
+ | |||
+ | ==== supportsMoreOptionsLink ==== | ||
+ | |||
+ | :!: Introduced in VuFind® 4.0 | ||
+ | This method returns true when the direct link provided by getResolverUrl offers a human-friendly interface; it should return false if the link resolver offers a data-only interface (for example, in the case of JOP). | ||
---- struct data ---- | ---- struct data ---- | ||
+ | properties.Page Owner : | ||
---- | ---- | ||
development/plugins/link_resolver_drivers.1347306532.txt.gz · Last modified: 2014/06/13 13:13 (external edit)