Habari Classes

From Habari Project

Jump to: navigation, search

This page or image is a candidate for deletion. The given reason is: All actual content on this page should be move to the relevant class page and this should be redirected to Category:Habari_Classes.

This notice should remain for a minimum of 1 week after it was placed on the page. If discussion is still ongoing, it should remain until a consensus is reached, after which the page will either be deleted or this notice removed.

If you disagree with its deletion, please discuss your reasons on this page or on its associated talk page, as applicable.

Remember to check if anything links here and the page history before deleting.


If a class is a subheading of another class, this means that the subheaded class is an extension (or implementation) of the class (or interface) above.

See also: Habari API Documentation

Contents

ACL

The ACL class implements access control lists, and provides the foundation of Habari's permission system.

ActionHandler

The ActionHandler class is the superclass of classes that respond to URL requests.

For example, when making a request for a user-facing theme page, the request is handled by UserThemeHandler, which extends ActionHandler.

ActionHandler contains the basic act() function required to handle incoming action requests, although this can be overridden in subclasses to implement different behavior. In Controller, when a RewriteRule's parse_regex matches the requested URL, it creates an instance of the RewriteRule's indicated handler class, and calls ->act() on that object, passing the RewriteRule's action as a parameter.

Classes that extend ActionHandler

ArrayObject (built in class)

Many objects in Habari are arrays of other objects. In addition to being able to iterate over the members of the array, it is also often useful to perform some actions on the entire collection of member objects. For these situations, PHP's built-in ArrayObject is extended. The following classes all extend ArrayObject:

Bitmask

Cache

ColorUtils

CronJob

CronTab

DatabaseConnection

Error

Exception

Format

FormControl

FormUI

HTMLTokenizer

Importer

InputFilter

Locale

Media

MediaAsset

MediaSilo

Miscellaneous

Pluggable

Plugins

QueryProfile

QueryRecord

The QueryRecord class defines a base object that corresponds to a database table. It has specific methods for inserting, updating, and deleting an instance of itself from the database.

Classes that extend QueryRecord

RemoteRequest

RequestProcessor

RPCClient

Session

The session class registers a PHP session handler to store transient data between page loads.

Singleton

A singleton is a design pattern used to restrict a class from being instantiated more than once. Habari uses the singleton pattern for a number of its classes. For example, the Controller class, which implements the Controller in Model-View-Controller, is a singleton because there can be only one Controller driving the Model-View. The DB class is a singleton facade: the normal execution of Habari requires only a single database instance for execution, but there are situations in which one might want to connect to a different database without having to write your own database handling routines.

Site

The site class is responsible for building URLs and filesystem paths of various sorts for the current site. This class provides a unified mechanism for building URLs and paths that supports Habari's multi-site functionality.

Stack

TemplateEngine

TemplateEngine defines the mechanics of a specific templating system. The two currently defined engines are RawPHPEngine and Smarty. Using the RawPHPEngine, one will construct template files in a manner similar to that used by, for example, WordPress: you mix HTML and PHP code together. Using the SmartyEngine, one will construct Smarty template files.

Themes

URLProperties

Utils

The utils class is a bit of a grab-bag of handy routines that don't really fit well within other classes.

UUID

The uuid class provides a mechanism for producing "universally unique identifiers", per RFC 4122.

Version

The version class is a small class used to record metadata about the current Habari version. Specifically, it reports the Habari API and database version numbers.

XMLRPCBinary

XMLRPCClient

XMLRPCDate

XMLRPCStruct

XMLRPCUtils

Alphabetical
Other Development Pages · Developer Introduction
Personal tools