The web/sys folder in VuFind contains a variety of useful classes that may help with the building of modules and other code changes. This page documents some of the key files and classes.
To use any of the system classes listed on this page, just include this line at the top of your PHP code:
require_once 'sys/Filename.php'
Where “Filename” is replaced with the actual name of the file containing the class.
This section details the actual files and classes available under web/sys. This is only an overview, and information of this nature tends to become stale quickly, so look at the code itself for more details and to check for additional modules beyond the ones documented here.
The AWS_Request class in this module provides a simple interface to Amazon Web Services (used for obtaining cover images and reviews).
The DataGrid class is an extension of the PEAR Structures_DataGrid class. As of this writing, it does not appear to be used by any existing code.
The Language class contains methods for dealing with ISO 639-2 language codes. It does not currently appear to be in use.
The Logger class is a wrapper around the PEAR Log class which allows messages to be logged by a variety of mechanisms configurable through web/conf/config.ini. The main motivation behind the initial development of this feature was to capture information on unexpected errors in the code, but it can also be used as a debugging tool or for gathering statistics.
The sip2 class implement's 3M's SIP2 communication standard and can be used as an authentication mechanism.
The I18N_Translator class is used (via a custom Smarty plug-in) to translate text used by the presentation layer into multiple languages.
This module contains the UserAccount class that handles user authentication by a variety of methods (method used varies based on config.ini settings).
This file contains the abstract IndexEngine interface implemented by the Solr and Zebra classes.
The Solr class provides an interface to the Solr index server. Its constructor takes two parameters: the URL for the Solr server (required) and the name of the index to use (optional).
SolrStats is an extension of the Solr class repurposed for storing information on VuFind's usage.
The Zebra class provides an interface to the Zebra index server.
The SRU class is an implementation of the Search/Retrieval via URL (SRU) standard.
Worldcat extends the SRU class into an implementation of the OCLC WorldCat Search API.
These files offer a variety of methods of maintaining a user's session information; the exact class to be included and instantiated is based on the [Session] type setting in web/conf/config.ini.
The MemcacheSession class uses memcache to maintain sessions.
The MySQLSession class uses the MySQL database to maintain sessions.
SessionInterface.php is an abstract base class for the other session handlers.