phpMyForum - The Forum Backend for PHP
PHP Logo

Objects Involved

The following should be regarded as an object map of the phpMyForum application. By mapping out the objects available we should be able to see what needs to be built, how individual parts should work and interact with their environment(s), and how the API should be constructed.

Object: Message

Brief Description: Holds data for a single message. Normal message will consist of up to the following information:

Properties

  • ID of poster
  • Date posted
  • Forum ID it was posted in
  • Message ID it was in reply to (zero to indicate it wasn't a reply)
  • Subject/Title of the message
  • Message body
  • Meta fields such as flags

Note that I foresee two primary access requirements for messages:

  1. Meta information. Statistical information about a forum will need number of messages, last post information, etc., which will require messages lookup.
  2. Loading of a selection of messages (all in forum, or a subset such as a search result or one page worth) into a collection for pointing to in a forum object.

Object: Forum

Brief description: Holds data for a single forum, which may or may not include it's messages.

Properties

  • ID of the forum
  • Parent ID
  • Date created
  • User ID that created it
  • (Short) description
  • (Long) description including any rules for posters/staff
  • Initially empty array containing pointers to message objects held in the forum
  • Initially empty array containing pointers to template objects to format various data parts

Object: Database

Brief Description: Holds mechanism for accessing the database. Object's PHP code is loaded file database-specific files, e.g. mysql.inc, which may be thought of as drivers.

Properties

  • To be defined

Object Map

The following diagram is intended to describe how the objects are connected.

Diagram of phpMyForum Objects - an Overview