About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


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.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
development:plugins:link_resolver_drivers [2015/12/21 16:47] – ↷ Links adapted because of a move operation demiankatzdevelopment:plugins:link_resolver_drivers [2023/11/27 18:48] (current) – [parseLinks] demiankatz
Line 1: Line 1:
 ====== Link Resolver Drivers ====== ====== Link Resolver Drivers ======
  
-// This page refers to VuFind 2.0 functionality; for the 1.x equivalent, see [[legacy:vufind_1.x_developer_manual:building_a_link_resolver_driver|Building a Link Resolver Driver]]//+This page contains details on writing a custom driver for an OpenURL Link Resolver not already supported by VuFind®.
  
-This page contains details on writing a custom driver for an OpenURL Link Resolver not already supported by VuFind. +Note that Link Resolver Drivers are only used when the "embed" setting is turned on in the [OpenURL] section of [[configuration:files:config.ini]].  This setting allows link resolver results to be directly embedded in the VuFind® search page rather than opening in a separate window.
- +
-Note that Link Resolver Drivers are only used when the "embed" setting is turned on in the [OpenURL] section of [[configuration:files:config.ini]].  This setting allows link resolver results to be directly embedded in the VuFind search page rather than opening in a separate window.+
  
 ===== Key Plugin Details ===== ===== Key Plugin Details =====
Line 11: Line 9:
 **Default Namespace:** \VuFind\Resolver\Driver **Default Namespace:** \VuFind\Resolver\Driver
  
-**Interface:** [[https://github.com/vufind-org/vufind/blob/master/module/VuFind/src/VuFind/Resolver/Driver/DriverInterface.php|\VuFind\Resolver\Driver\DriverInterface]]+**Interface:** [[https://github.com/vufind-org/vufind/blob/dev/module/VuFind/src/VuFind/Resolver/Driver/DriverInterface.php|\VuFind\Resolver\Driver\DriverInterface]]
  
 **Service Locator Configuration Section in module.config.php:** ['vufind']['plugin_managers']['resolver_driver'] **Service Locator Configuration Section in module.config.php:** ['vufind']['plugin_managers']['resolver_driver']
  
-**Service Manager Name for Service Locator:** VuFind\ResolverDriverPluginManager+**Service Manager Name for Service Locator:** VuFind\ResolverDriverPluginManager (VuFind® 2.x-4.x), VuFind\Resolver\Driver\PluginManager (VuFind® 5.0+)
  
-See the [[development:plugins:general_information|General Plugin Information]] page for more details on VuFind plugins.+See the [[development:plugins:general_information|General Plugin Information]] page for more details on VuFind® plugins.
  
 ===== Basic Structure ===== ===== Basic Structure =====
  
-  * The PHP driver class must be registered in the service locator with the value used as the the resolver setting in the [OpenURL] section of web/conf/config.ini.  (i.e. "sfx").+  * The PHP driver class must be registered in the service locator with the value used as the the resolver setting in the [OpenURL] section of [[configuration:files:config.ini|config.ini]].  (i.e. "sfx")
 +  * The driver class must implement the VuFind\Resolver\Driver\DriverInterface. For convenience, starting in release 4.0, most drivers will achieve this by extending VuFind\Resolver\Driver\AbstractBase.
  
 ===== Key Methods ===== ===== Key Methods =====
Line 28: 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's native interface.
  
 ==== parseLinks ==== ==== parseLinks ====
  
-This method takes the output of fetchLinks and parses it into an associative array with the following keys:+This method takes the output of fetchLinks and parses it into an array of associative arrays with the following keys:
  
   * href - the link to access the resource   * href - the link to access the resource
Line 37: 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/resolverLinks.phtml; //this feature was added in VuFind2.5//+  * 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/resolverLinks.phtml; //this feature was added in VuFind® 2.5// 
 + 
 +==== 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.1450716450.txt.gz · Last modified: 2015/12/21 16:47 by demiankatz