System Classes

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:

require_once 'sys/Filename.php'

Where “Filename” is replaced with the actual name of the file containing the class.

Available Files

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.

General Purpose

Amazon.php

The AWS_Request class in this module provides a simple interface to Amazon Web Services (used for obtaining cover images and reviews).

Datagrid.php

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.

Language.php

The Language class contains methods for dealing with ISO 639-2 language codes. It does not currently appear to be in use.

Logger.php

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.

SIP2.php

The sip2 class implement's 3M's SIP2 communication standard and can be used as an authentication mechanism.

Translator.php

The I18N_Translator class is used (via a custom Smarty plug-in) to translate text used by the presentation layer into multiple languages.

User.php

This module contains the UserAccount class that handles user authentication by a variety of methods (method used varies based on config.ini settings).

Index Interface

IndexEngine.php

This file contains the abstract IndexEngine interface implemented by the Solr and Zebra classes.

Solr.php

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.php

SolrStats is an extension of the Solr class repurposed for storing information on VuFind's usage.

Zebra.php

The Zebra class provides an interface to the Zebra index server.

Searching

SRU.php

The SRU class is an implementation of the Search/Retrieval via URL (SRU) standard.

WorldCat.php

Worldcat extends the SRU class into an implementation of the OCLC WorldCat Search API.

Session Interface

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.

MemcacheSession.php

The MemcacheSession class uses memcache to maintain sessions.

MySQLSession.php

The MySQLSession class uses the MySQL database to maintain sessions.

SessionInterface.php

SessionInterface.php is an abstract base class for the other session handlers.

 
system_classes.txt · Last modified: 2009/08/14 10:15 by demiankatz