This is an old revision of the document!
Table of Contents
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.
Accessing System Classes
To use any of the system classes listed on this page, just include this line at the top of your PHP code:
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.
Not currently formatted as a class, this file contains a single function for autoloading classes.
Used for storing collections of IDs selected by the user while browsing result lists (work in progress as of this writing).
The CitationBuilder class is used to build APA and MLA citations for use in the VuFind interface.
Not currently formatted as a class, this module contains an assortment of stand-alone functions for dealing with configuration files.
Introduced in VuFind 1.1, this class centralizes VuFind's logic for connecting to resources like the database, index engine, catalog, etc.
This is a simple class for maintaining an incremental counter. It is useful for keeping track of how many elements have been displayed in certain contexts.
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. This file has been removed from newer versions of VuFind.
Used to help with formatting (and deciding when to display) hold/recall links.
This file defines the UInterface class, an extension of the base Smarty class used for rendering templates for the presentation layer of VuFind.
Perform ISBN validation and conversion between 10/13-digit formats.
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.
This file contains wrapper classes used for sending email and text messages from within VuFind.
Utility functions for interfacing with the Open Library API.
Database wrapper for Oracle access (currently used only by the Virtua ILS driver; not recommended for other purposes at this time).
The VuFindPager class is a wrapper around the PEAR Pager which instantiates a Pager object with VuFind-specific defaults in place.
An extension of the PEAR HTTP_Request class that allows VuFind to use a proxy server when necessary.
This class manages the data necessary to maintain “next/prev” links to navigate a result set from the record page.
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).
Either converts date and times from a defined time string to a universal display format or from the universal display format to a requested format (often used by ILS drivers for normalization of time representation).
The AWS_Request class in this module provides a simple interface to Amazon Web Services (used for obtaining cover images and reviews).
The ExternalExcerpts class is used for loading book excerpts from third-party APIs.
The ExternalReviews class is used for loading book reviews from third-party APIs.
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.
A collection of static utility methods useful in processing Solr queries.
The Zebra class provides an interface to the Zebra index server. This code became obsolete and has been removed from later versions of VuFind.
The SRU class is an implementation of the Search/Retrieval via URL (SRU) standard.
The Summon class communicates with Serials Solutions Summon API.
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. See Creating a Session Handler for more details.
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.