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:record_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:record_drivers [2015/12/11 17:40] – [Record Driver Plugins] demiankatzdevelopment:plugins:record_drivers [2020/09/22 13:56] (current) demiankatz
Line 1: Line 1:
 ====== Record Driver Plugins ====== ====== Record Driver Plugins ======
 +
 +// This page applies to VuFind 2.x and newer; for relevant 1.x information, see [[legacy:vufind_1.x_developer_manual:supporting_a_new_metadata_format|this page]]. //
  
 Record drivers are used to allow VuFind to interact with arbitrary metadata.  Every record is represented by a driver object which wraps around the raw data (whether it comes from a Solr index, a third-party API response, or a database lookup).  The record drivers implement consistent interfaces that allow other code to make use of data without concern for its origin. Record drivers are used to allow VuFind to interact with arbitrary metadata.  Every record is represented by a driver object which wraps around the raw data (whether it comes from a Solr index, a third-party API response, or a database lookup).  The record drivers implement consistent interfaces that allow other code to make use of data without concern for its origin.
Line 8: Line 10:
 **Default Namespace:** \VuFind\RecordDriver **Default Namespace:** \VuFind\RecordDriver
  
-**Base Class:** [[https://github.com/vufind-org/vufind/blob/master/module/VuFind/src/VuFind/RecordDriver/AbstractBase.php|\VuFind\RecordDriver\AbstractBase]]+**Base Class:** [[https://github.com/vufind-org/vufind/blob/dev/module/VuFind/src/VuFind/RecordDriver/AbstractBase.php|\VuFind\RecordDriver\AbstractBase]]
  
 **Service Locator Configuration Section in module.config.php:** ['vufind']['plugin_managers']['recorddriver'] **Service Locator Configuration Section in module.config.php:** ['vufind']['plugin_managers']['recorddriver']
  
-**Service Manager Name for Service Locator:** VuFind\RecordDriverPluginManager+**Service Manager Name for Service Locator:** VuFind\RecordDriverPluginManager (VuFind 2.x-4.x), VuFind\RecordDriver\PluginManager (VuFind 5.0+)
  
 **Template Name:** VuFind loads record-related templates from the subdirectory of the RecordDriver folder of the current theme whose name corresponds with the class of the plugin (ignoring the namespace).  Template directories inherit from one another in the same way that PHP classes inherit from one another -- i.e. if VuFind\RecordDriver\SolrMarc is a subclass of VuFind\RecordDriver\SolrDefault, VuFind will first check RecordDriver\SolrMarc for templates, then fail over to RecordDriver\SolrDefault if they are missing. **Template Name:** VuFind loads record-related templates from the subdirectory of the RecordDriver folder of the current theme whose name corresponds with the class of the plugin (ignoring the namespace).  Template directories inherit from one another in the same way that PHP classes inherit from one another -- i.e. if VuFind\RecordDriver\SolrMarc is a subclass of VuFind\RecordDriver\SolrDefault, VuFind will first check RecordDriver\SolrMarc for templates, then fail over to RecordDriver\SolrDefault if they are missing.
Line 22: Line 24:
 ===== Notes ===== ===== Notes =====
  
-  * Record drivers used with the Solr index should be registered in the service locator with names that correspond with the recordtype value in the Solr index prepended with "Solr."  For example, if recordtype = marc in the Solr index, a service called "SolrMarc" will be loaded from the service locator.  If no matching service can be found, the SolrDefault service will be used. +  * Record drivers used with the Solr index should be registered in the service locator with names that correspond with the record_format (or recordtype, in VuFind 5.x and earlier) value in the Solr index prepended with "Solr."  For example, if record_format = marc in the Solr index, a service called "SolrMarc" will be loaded from the service locator.  If no matching service can be found, the SolrDefault service will be used. 
-  * See the [[vufind2:record_driver_method_master_list|Record Driver Method Master List]] for more notes on how record drivers work.+  * See the [[development:architecture:record_driver_method_master_list|Record Driver Method Master List]] for more notes on how record drivers work.
 ---- struct data ---- ---- struct data ----
 +properties.Page Owner : 
 ---- ----
  
development/plugins/record_drivers.1449855633.txt.gz · Last modified: 2015/12/11 17:40 by demiankatz