Category:Class Reference
From CunningPlans
(Redirected from Class Reference)
The classes and libraries that make up Baldrick are listed below, grouped by area of functionality.
The most important classes in the system are Baldrick::Turnip, Baldrick::App, and Baldrick::Dogsbody. Authors of Baldrick applications will spend much of their time subclassing Baldrick::Dogsbody.
Contents |
[edit] Core Classes and Libraries
- Not a class, but a library of functions used extensively by the other files.
- Generic base class for all objects in a Baldrick application. Provides constructors, logging, abort(), getConfig() and a few other methods essential for just about everything.
- Baldrick::App is-a Baldrick::Turnip
- The framework, responsible for loading the configuration file, creating other objects, dispatching requests to request handler objects (Baldrick::Dogsbody), handling compile-time and run-time errors.
[edit] Request Handling
- Baldrick::Request is-a Baldrick::Turnip
- A wrapper for the CGI object that represents parameters from the user, or information about the user from the environment.
- Baldrick::Response is-a Baldrick::Turnip
- provides functions for sending output to the user's web browser.
- Baldrick::Dogsbody is-a Baldrick::Turnip
- Request handler. The Baldrick::App class, upon obtaining a Request object, will then pass the Request to a Dogsbody subclass for handling. Every Baldrick application must create subclasses of Dogsbody; it is in these subclasses that the actual work of handling a user request and producing output is done.
- Baldrick::Session is-a Baldrick::Turnip
- A class providing methods for saving and retrieving information relevant to a user currently active on the site, allowing for persistence between user requests. This class has no actual storage mechanism, however - only derived classes like Baldrick::FileSession actually do anything useful.
- Baldrick::FileSession is-a Baldrick::Session, Baldrick::Turnip
- A subclass of Baldrick::Session that stores information about user sessions in files on the filesystem.
- Baldrick::DungGatherer is-a Baldrick::Turnip
- A class for creating a Dogsbody. Long-lived applications may wish to subclass this to implement reusability of resources for multiple requests.
- Entry point for Apache mod_perl
[edit] Input and Output
- Baldrick::InputValidator is-a Baldrick::Turnip
- A class with functions for examining user input, detecting errors such as required fields missing, invalid email address in an email field, values that don't match a regular expression, etc., invoked either by callings its functions or by config file directives. It also handles display of errors.
- Baldrick::TemplateAdapter is-a Baldrick::Turnip
- Abstract class, defines the interface for the template-processing classes that generate output.
- Baldrick::TemplateAdapterHelper is-a Baldrick::Turnip
- Provides an object called "internal", accessible in templates; provides useful functions like formatting text and dumping objects.
- Baldrick::TemplateAdapter::TemplateToolkit is-a Baldrick::TemplateAdapter, Baldrick::Turnip
- One example of a template-processing class derived from TemplateAdapter. This class uses the Template Toolkit perl module (installed separately) for template processing.
- Baldrick::TemplateAdapter::TextTemplate is-a Baldrick::TemplateAdapter, Baldrick::Turnip
- One example of a template-processing class derived from TemplateAdapter. This class uses the Text::Template perl module (installed separately) for template processing.
- under construction, not yet included, this file is intended to provide multi-language support.
[edit] Database
- Baldrick::Database is-a Baldrick::Turnip
- Encapsulates a DBD database handle, and provides querying methods.
- Baldrick::SpecialTurnip is-a Baldrick::Turnip
- Represents a row from a table or a join of tables with a primary key, providing methods to load, modify, and save contents.
- Baldrick::TurnipWagon is-a Baldrick::Turnip
- A container for SpecialTurnips that allows for retrieval by primary key. Useful for bulk-loading SpecialTurnips, then distributing across arbitrary data structures.
[edit] Users and Login
- Represents a user - the current user of the application, whether anonymous or logged in, or users being looked up or edited. Does not provide methods to load, save, or authenticate, instead relying on UserLoader and subclasses for this.
- Abstract base class for loading and authenticating users; a factory for Baldrick::User.
- A subclass of Baldrick::UserLoader that gets user and group information from a database. Can be configured to load users from any arbitrary table, view or join, by id, email, or username, each of which can be mapped to any real fieldname.
- A Baldrick::Dogsbody handler suitable for a login/logout/reset-password page.
[edit] Loaders
- Not a class that can be instantiated, this package simply loads the rest of the framework.
- Wrapper for 'use Baldrick::Baldrick;', mainly exists so "$ perldoc Baldrick" works.
- baldrick-stub or Baldrick::Stub
- Entry point for CGI applications; merely creates an App and turns over control to it.
- Entry point for mod_perl applications; creates an App, turns over control to it, then reuses an existing App for subsequent requests.
[edit] Examples
- Not intended to be used as such; this is a template for module authors to copy when writing a new Dogsbody (request handler) class.
Articles in category "Class Reference"
There are 10 articles in this category.
B |
B cont. |
B cont.FT |
