About Features Downloads Getting Started Documentation Events Support GitHub

Site Tools


legacy:vufind_1.x_developer_manual:system_classes

This is an old revision of the document!


System Classes

:!: This page refers to VuFind 1.x; for information on newer versions, see the current architecture page.

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

Autoloader.php

Not currently formatted as a class, this file contains a single function for autoloading classes.

Cart_Model.php

Used for storing collections of IDs selected by the user while browsing result lists (work in progress as of this writing).

CitationBuilder.php

The CitationBuilder class is used to build APA and MLA citations for use in the VuFind interface.

ConfigArray.php

Not currently formatted as a class, this module contains an assortment of stand-alone functions for dealing with configuration files.

ConnectionManager.php

Introduced in VuFind 1.1, this class centralizes VuFind's logic for connecting to resources like the database, index engine, catalog, etc.

Counter.php

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.

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. This file has been removed from newer versions of VuFind.

HoldLogic.php

Used to help with formatting (and deciding when to display) hold/recall links.

Interface.php

This file defines the UInterface class, an extension of the base Smarty class used for rendering templates for the presentation layer of VuFind.

ISBN.php

Perform ISBN validation and conversion between 10/13-digit formats.

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.

Mailer.php

This file contains wrapper classes used for sending email and text messages from within VuFind.

OpenLibraryUtils.php

Utility functions for interfacing with the Open Library API.

Oracle_Connection.php

Database wrapper for Oracle access (currently used only by the Virtua ILS driver; not recommended for other purposes at this time).

Pager.php

The VuFindPager class is a wrapper around the PEAR Pager which instantiates a Pager object with VuFind-specific defaults in place.

Proxy_Request.php

An extension of the PEAR HTTP_Request class that allows VuFind to use a proxy server when necessary.

ResultScroller.php

This class manages the data necessary to maintain “next/prev” links to navigate a result set from the record page.

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

VuFindDate.php

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

External Content

Amazon.php

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

Excerpts.php

The ExternalExcerpts class is used for loading book excerpts from third-party APIs.

Reviews.php

The ExternalReviews class is used for loading book reviews from third-party APIs.

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.

SolrUtils.php

A collection of static utility methods useful in processing Solr queries.

Zebra.php

The Zebra class provides an interface to the Zebra index server. This code became obsolete and has been removed from later versions of VuFind.

Searching

SRU.php

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

Summon.php

The Summon class communicates with Serials Solutions Summon API.

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. See Creating a Session Handler for more details.

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.

legacy/vufind_1.x_developer_manual/system_classes.1449771066.txt.gz · Last modified: 2015/12/10 18:11 by demiankatz