Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

BaseModule Class Reference
[Basic Modules]

Inheritance diagram for BaseModule:

MyModule BaseAdmin BaseCrons BaseMap BaseObject BaseTags BaseTicket ObjectManager MyObject MyManager BaseAlert BaseComment BaseEvent BaseForum BaseForumThread BaseGroup BaseImage BaseInvitation BaseMessage BaseRPSGame BaseUser BaseUserAction BaseAlerts BaseCalendar BaseForums BaseForumThreads BaseGallery BaseInbox BaseInvitations BaseOutbox BaseThread BaseUserActions List of all members.

Detailed Description

A modules that handles the very basic, core tasks of the module system.

It handles pages, page validation, parameter validation, creating links, error handling, status messages, css, javascript, rss, and and provides many useful utility functions to make programming for the web as ridiculously simple as possible.

Definition at line 11 of file base-module.inc.php.

Public Member Functions

 __construct ()
 Creates a new BaseModule.
 init ($page= 'main', $vars=array())
 This function initializes a page in a module.
 draw ()
 This function handles drawing the content area for the module page.
 setTemplate (BaseTemplate $template)
 sets our template object.
 initParams ($page, $vars=array())
 This function initializes our page parameters and does quite a bit of error checking.
 initPage ($page)
 This function initializes the page we eventually want to draw.
 getTitle ()
 This function gets the title of the page.
 getContent ()
 This function gets our page as a string.
 getError ()
 This function gets the errors for the module.
 getStatus ()
 This function gets the status messages for the module.
 getUrl ($params=array(), $base=null, $full=false)
 Gets a string url from an array of parameters.
 getParams ($array)
 This function gets the parameters from an array in url form.
 drawUrl ($params, $text)
 This function draws a link.
 getLink ($params, $text, $base=null, $full=false)
 This function gets a text link.
 hasError ()
 Do we have errors or that?
 setError ($error)
 Sets the error message for the page.
 hasStatus ()
 Do we have status messages or not?
 addStatus ($str)
 Add a status message to the module.
 initParametersPage ()
 This function initializes the parameters page.
 drawParametersPage ()
 This function draws the module parameters page..
 initMainPage ()
 This function initializes teh main page of the module.
 drawMainPage ()
 This function draws teh main page.
 initModuleXmlPage ()
 This function initialializes the module page.
 drawModuleXmlPage ()
 This function draws teh module page...
 parseModuleXml ()
 This function generates the xml for the module.
 params ($key=null)
 This function is used to access the parameters of the object.
 setParam ($key, $val)
 Update the value of a parameter for a page.
 getModuleXml ()
 This function gets the xml of the module in string format.
 getPagesXml ()
 This function gets the string representation of the page xml.
 getMainPageXml ()
 This function gets the xml for the main page configuration.
 getModulePageXml ()
 This function gets the xml for the module page configuration.
 getParametersPageXml ()
 This function gets the xml for the parameters page configuration.
 getCreateTablePageXml ()
 This function gets the xml for the parameters page configuration.
 addBox ($box)
 This function adds a box to the module.
 needsSideBar ()
 This function tells us whether we need to draw a sidebox or not.
 drawSideBar ()
 This function will draw the sidebar, if needed.
 addNav ($text)
 This function adds text or link to the navigation.
 getNav ()
 Get the navigation.
 drawNavigation ()
 This draws the navigation as an unordered list wrapped in a div with class 'pageNav'.
 drawPageNavigation ($links)
 draw our page navigation links
 drawPlainNavigation ($links)
 draw our page navigation links in a plain format
 assertLogin ()
 This function is used to ensure the user is logged in.
 needsCss ($file)
 Add a css file to the list of needed css files.
 drawCss ()
 Draw the markup to include the css files.
 needsJs ($file)
 Add a javascript file to the page.
 drawJs ()
 Draw the markup to include a javascript file.
 addFeed ($url, $title)
 This adds feed to global feed array.
 drawFeeds ()
 This draws teh markup for rss feeds in the header.
 drawHead ()
 This draws all the markup for needed css, javascript, and any rss feeds.
 initCreateTablePage ()
 initialize our create table page.
 drawCreateTablePage ()
 draw our create table page.
 runCreateTableSql ()
 this function actually runs our create table code.
 getCreateTableSql ()
 this gets the sql statement(s) that create the tables needed for this module.

Static Public Member Functions

 getCachedPage ($key=null)
 get the data for our cached page!
 setCachedPage ($data, $key=null)
 save the page as cached.
 getPageCacheKey ($page=null)
 get us a key that will be unique for the page we're on...
 deleteCachedPage ($page)
 deletes a page from the cache
 tryPageCache ($page=null)
 this function does two things: it generates a key and then uses that key to try the cache.

Public Attributes

 $baseUrl
 public String base url to use for creating links
 $page
 public String what page we are on.
 $pageTitle
 public String title of the page we are on.
 $template = null
 BaseTemplate our template to use to draw our page.
 $english
 public Boolean an english word description of what the module is.
 $xml
 public String xml description of object.
 $doCachePage = false
 public are we caching the page?
 $_Name = null
 store the name of our module for our XML
 $_Description = null
 store the description of our module for our XML
 $_Version = null
 store the version of our module for our XML
 $_Author = null
 store the author of our module for our XML
 $_Website = null
 store the website of our module for our XML

Static Public Attributes

 $pageCacheLife = 900
 public the lifetime of the cached page.

Private Attributes

 $params = array()
 private Keyed Array of parameters for the page.
 $error = null
 private Array of string errors for the page.
 $status = array()
 private Array of string status messages for the page
 $sideboxes = array()
 private Array of BaseBox objects for the page.
 $navigation = array()
 private Array of text/links of navigation for the page.

Static Private Attributes

 $Feeds = array()
 Array of RSS feeds for drawing in <head> of page.
 $FeedTitles = array()
 corresponding array of titles for RSS feeds to be drawn


Member Function Documentation

BaseModule::__construct  ) 
 

Creates a new BaseModule.

Definition at line 116 of file base-module.inc.php.

References Config::get().

Referenced by BaseObject::__set().

BaseModule::addBox box  ) 
 

This function adds a box to the module.

This is used to do custom sidebars.

Parameters:
$box an object that is extended from, or is, a BaseBox

Definition at line 820 of file base-module.inc.php.

BaseModule::addFeed url,
title
 

This adds feed to global feed array.

that makes it so we can call addFeed from modules other than the main module.

Parameters:
$url the url to link to
$title the title of the feed

Definition at line 1000 of file base-module.inc.php.

Referenced by ObjectManager::getPlainRssLink(), and BaseForumThread::initViewPage().

BaseModule::addNav text  ) 
 

This function adds text or link to the navigation.

Parameters:
$text text or link to add to the navigation

Definition at line 859 of file base-module.inc.php.

BaseModule::addStatus str  ) 
 

Add a status message to the module.

Parameters:
$str string status message.

Definition at line 565 of file base-module.inc.php.

Referenced by BaseObject::checkTable(), and BaseUser::initLoginPage().

BaseModule::assertLogin  ) 
 

This function is used to ensure the user is logged in.

If called and a user is logged in, nothing happens. However, if a user is not logged in, it redirects them to the login page with a variable to return them to the original page once they are logged in. Very handy function!

Definition at line 921 of file base-module.inc.php.

References Util::redirect().

Referenced by BaseAdmin::init(), BaseInvitation::initApprovePage(), BaseEvent::initAttendPage(), BaseImage::initBulkConfigPage(), BaseImage::initBulkFormPage(), BaseRPSGame::initChallengePage(), BaseRPSGame::initDefendPage(), BaseUser::initDeleteMePage(), BaseOutbox::initDeletePage(), BaseInbox::initDeletePage(), BaseInvitation::initDenyPage(), BaseUserAction::initDoActionPage(), BaseUser::initEditPage(), BaseUser::initEditPassPage(), BaseUser::initEmailPrefsPage(), BaseInvitation::initInvitePage(), BaseEvent::initInvitePage(), BaseGroup::initJoinPage(), BaseGroup::initLeavePage(), BaseEvent::initLeavePage(), BaseInvitation::initMainPage(), BaseUserAction::initMessagePage(), BaseForum::initPostPage(), BaseUser::initPrefsPage(), BaseEvent::initRSVPPage(), BaseUserActions::initSearchPage(), BaseOutbox::initSearchPage(), BaseInvitations::initSearchPage(), BaseInbox::initSearchPage(), BaseAlerts::initSearchPage(), BaseUser::initSetImagePage(), BaseRPSGame::initTauntPage(), BaseEvent::initUnInvitePage(), BaseUser::initViewPage(), BaseUserAction::initViewPage(), BaseMessage::initViewPage(), BaseInvitation::initViewPage(), and BaseAlert::initViewPage().

BaseModule::deleteCachedPage page  )  [static]
 

deletes a page from the cache

Parameters:
$page a page to delete eg. /module/page

Definition at line 1137 of file base-module.inc.php.

References CacheBot::delete().

BaseModule::draw  ) 
 

This function handles drawing the content area for the module page.

Additionally, if any extra markup is needed, it draws that too.

Reimplemented in BaseCrons.

Definition at line 200 of file base-module.inc.php.

BaseModule::drawCreateTablePage  ) 
 

draw our create table page.

show our queries, etc.

Reimplemented in BaseGroup.

Definition at line 1057 of file base-module.inc.php.

BaseModule::drawCss  ) 
 

Draw the markup to include the css files.

You probably wont call this directly... use drawHead() instead.

Definition at line 952 of file base-module.inc.php.

BaseModule::drawFeeds  ) 
 

This draws teh markup for rss feeds in the header.

You should probably use drawHead instead.

Definition at line 1009 of file base-module.inc.php.

BaseModule::drawHead  ) 
 

This draws all the markup for needed css, javascript, and any rss feeds.

You will most definitely need to add this to your drawHeader() function in your template.

Definition at line 1024 of file base-module.inc.php.

BaseModule::drawJs  ) 
 

Draw the markup to include a javascript file.

You probably wont use this, instead add drawHead() to your header.

Definition at line 984 of file base-module.inc.php.

BaseModule::drawMainPage  ) 
 

This function draws teh main page.

You should override this for your module if you want a main page.

Reimplemented in BaseAdmin, BaseInvitation, BaseMap, BaseTags, BaseThread, and BaseTicket.

Definition at line 678 of file base-module.inc.php.

BaseModule::drawModuleXmlPage  ) 
 

This function draws teh module page...

which is the xml that describes teh module.

Definition at line 695 of file base-module.inc.php.

BaseModule::drawNavigation  ) 
 

This draws the navigation as an unordered list wrapped in a div with class 'pageNav'.

Definition at line 877 of file base-module.inc.php.

References Util::ieDrawClear().

BaseModule::drawPageNavigation links  ) 
 

draw our page navigation links

Parameters:
$links an array of HTML links

Definition at line 896 of file base-module.inc.php.

Referenced by BaseForum::drawViewPage().

BaseModule::drawParametersPage  ) 
 

This function draws the module parameters page..

which is a nice representation of the pages contained in the module.

Definition at line 581 of file base-module.inc.php.

BaseModule::drawPlainNavigation links  ) 
 

draw our page navigation links in a plain format

the format is all the links seperated by '~' and wrapped in a div ov PageNavigation

Parameters:
$links an array of HTML links

Definition at line 908 of file base-module.inc.php.

BaseModule::drawSideBar  ) 
 

This function will draw the sidebar, if needed.

It basically loops thru the boxxes that have been added.

Definition at line 839 of file base-module.inc.php.

References Util::ieDrawClear().

BaseModule::drawUrl params,
text
 

This function draws a link.

Parameters:
$params a keyed array of parameters
$text the text to link

Definition at line 508 of file base-module.inc.php.

Referenced by BaseMessage::drawRow(), and BaseMessage::drawViewPage().

BaseModule::getCachedPage key = null  )  [static]
 

get the data for our cached page!

Returns:
the cached data for our page... whatever that may be.

Definition at line 1096 of file base-module.inc.php.

References CacheBot::get().

Referenced by BaseJumper::start().

BaseModule::getContent  ) 
 

This function gets our page as a string.

Returns:
a string consisting of the contents of the page

Definition at line 352 of file base-module.inc.php.

BaseModule::getCreateTablePageXml  ) 
 

This function gets the xml for the parameters page configuration.

Returns:
an xml string for the parameters page.

Definition at line 809 of file base-module.inc.php.

BaseModule::getCreateTableSql  ) 
 

this gets the sql statement(s) that create the tables needed for this module.

these should be the tables the module directly accesses.

Returns:
teh sql string

Reimplemented in BaseGroup, BaseObject, BaseTags, and BaseTicket.

Definition at line 1085 of file base-module.inc.php.

BaseModule::getError  ) 
 

This function gets the errors for the module.

Returns:
the errors generated during page initialization

Definition at line 375 of file base-module.inc.php.

BaseModule::getLink params,
text,
base = null,
full = false
 

This function gets a text link.

Parameters:
$params a keyed array of parameters
$text the text to link
$base the base url to use. Optional
$full use a full link with http:// and hostname. Optional
Returns:
a text/html link ready to be echo'd

Definition at line 523 of file base-module.inc.php.

Referenced by BaseUserAction::drawActionsBox(), BaseImage::drawBulkFormPage(), BaseImage::drawBulkFormSelect(), BaseRPSGame::drawChallengeBox(), BaseComment::drawCommentDetails(), BaseCalendar::drawDatePage(), BaseRPSGame::drawDefendBox(), BaseUser::drawLoginPage(), BaseAdmin::drawMainPage(), BaseUserAction::drawRow(), BaseUser::drawSetImagePage(), BaseAdmin::drawViewCachePage(), BaseUser::emailDeleteConfirmation(), BaseInvitation::getApproveLink(), BaseObject::getCommentsLink(), BaseInvitation::getDenyLink(), BaseTags::getLinkedTags(), BaseObject::getName(), ObjectManager::getPlainRssLink(), BaseInvitations::getSearchLinks(), and BaseUser::sendActivationEmail().

BaseModule::getMainPageXml  ) 
 

This function gets the xml for the main page configuration.

Returns:
an xml string for the main page.

Reimplemented in BaseThread.

Definition at line 779 of file base-module.inc.php.

BaseModule::getModulePageXml  ) 
 

This function gets the xml for the module page configuration.

Returns:
an xml string for the module page.

Definition at line 789 of file base-module.inc.php.

BaseModule::getModuleXml  ) 
 

This function gets the xml of the module in string format.

Parameters:
an xml string containing the entire module xml.

Definition at line 746 of file base-module.inc.php.

BaseModule::getNav  ) 
 

Get the navigation.

Returns:
an array of navigation text. do what you like with it.

Definition at line 869 of file base-module.inc.php.

BaseModule::getPageCacheKey page = null  )  [static]
 

get us a key that will be unique for the page we're on...

Returns:
a key that identifies the page we're on.

Definition at line 1124 of file base-module.inc.php.

BaseModule::getPagesXml  ) 
 

This function gets the string representation of the page xml.

If you are doing any sort of custom pages you will definitely be overriding this function.

Returns:
a string representation of the module's page xml.

Reimplemented in BaseAdmin, BaseCalendar, BaseEvent, BaseForum, BaseGroup, BaseImage, BaseInbox, BaseInvitation, BaseMap, BaseObject, BaseOutbox, BaseRPSGame, BaseTags, BaseTicket, BaseUserAction, BaseUser, and ObjectManager.

Definition at line 762 of file base-module.inc.php.

BaseModule::getParametersPageXml  ) 
 

This function gets the xml for the parameters page configuration.

Returns:
an xml string for the parameters page.

Definition at line 799 of file base-module.inc.php.

BaseModule::getParams array  ) 
 

This function gets the parameters from an array in url form.

Parameters:
$array a keyed array of parameters
Returns:
a string of the parameters in url form.

Definition at line 495 of file base-module.inc.php.

BaseModule::getStatus  ) 
 

This function gets the status messages for the module.

Returns:
the status messages generated during the running of the page

Definition at line 385 of file base-module.inc.php.

BaseModule::getTitle  ) 
 

This function gets the title of the page.

Returns:
The title of the page.

Definition at line 339 of file base-module.inc.php.

BaseModule::getUrl params = array(),
base = null,
full = false
 

Gets a string url from an array of parameters.

Parameters:
$params the parameters for the link.
$base the base url to use. default: $this->baseUrl
Returns:
the string url you want!

Definition at line 397 of file base-module.inc.php.

References Config::get(), and Util::setUrlParam().

Referenced by BaseUser::createActivateHelpForm(), BaseEvent::createAttendForm(), BaseAdmin::createClearCacheForm(), BaseAdmin::createClearHitsForm(), BaseAdmin::createDeleteCacheForm(), BaseUser::createDeleteForm(), BaseUser::createEditPassForm(), BaseUser::createEmailPrefsForm(), BaseInvitation::createInviteForm(), BaseEvent::createInviteForm(), BaseEvent::createLeaveForm(), BaseUser::createLoginForm(), BaseUser::createLostPassForm(), BaseUserAction::createMessageForm(), BaseForum::createPostForm(), BaseUser::createRegisterForm(), BaseMessage::createReplyForm(), BaseComment::createReplyForm(), BaseEvent::createRSVPForm(), ObjectManager::createSearchForm(), BaseRPSGame::createTauntForm(), BaseEvent::createUnInviteForm(), BaseImage::drawBulkConfigPage(), BaseImage::drawBulkFormSelect(), BaseThread::drawCommentSummary(), BaseMap::drawMapJsPage(), BaseOutbox::drawRows(), BaseInbox::drawRows(), BaseMessage::drawTitleBar(), BaseComment::drawTitleBar(), BaseObject::editFormCreate(), BaseImage::editPagePostSuccess(), BaseUser::emailDeleteConfirmation(), BaseThread::generateRss(), BaseCalendar::getCalendarLink(), BaseCalendar::getDateLink(), BaseImage::getImage(), ObjectManager::getPaginationUrl(), BaseObject::getPublicData(), BaseObject::getRssItem(), BaseUser::getTicket(), BaseUser::registerFormAddFields(), BaseUser::sendActivationEmail(), and BaseTicket::url().

BaseModule::hasError  ) 
 

Do we have errors or that?

Returns:
Boolean true or false depending on whether errors were generated during initialization or not

Definition at line 534 of file base-module.inc.php.

BaseModule::hasStatus  ) 
 

Do we have status messages or not?

Returns:
Boolean true or false depending on whether status messages were generated during initialization or not

Definition at line 555 of file base-module.inc.php.

BaseModule::init page = 'main',
vars = array()
 

This function initializes a page in a module.

Parameters:
$page the page to initialize. It must be defined in the xml. Optional
$vars a keyed array of parameters for the page.

Reimplemented in BaseAdmin, BaseCrons, and BaseImage.

Definition at line 131 of file base-module.inc.php.

References Config::get(), and Config::set().

BaseModule::initCreateTablePage  ) 
 

initialize our create table page.

anyone can view... easier for them to setup a table to work with our data. only admins can run the code, however.

Definition at line 1036 of file base-module.inc.php.

BaseModule::initMainPage  ) 
 

This function initializes teh main page of the module.

You will probably override it at some point in time.

Reimplemented in BaseAdmin, BaseCalendar, BaseInvitation, BaseMap, BaseTags, BaseThread, and ObjectManager.

Definition at line 670 of file base-module.inc.php.

BaseModule::initModuleXmlPage  ) 
 

This function initialializes the module page.

Definition at line 685 of file base-module.inc.php.

BaseModule::initPage page  ) 
 

This function initializes the page we eventually want to draw.

It passes off the page initialization to init{$page}Page()

Parameters:
$page the page we want to initialize

Definition at line 319 of file base-module.inc.php.

BaseModule::initParametersPage  ) 
 

This function initializes the parameters page.

You probably wont ever use it.

Definition at line 573 of file base-module.inc.php.

BaseModule::initParams page,
vars = array()
 

This function initializes our page parameters and does quite a bit of error checking.

Parameters:
$page a simplexml object that is just the page xml (options and such)
$vars a keyed array of variables to parse

Definition at line 223 of file base-module.inc.php.

BaseModule::needsCss file  ) 
 

Add a css file to the list of needed css files.

Use this if you need some sort of extra css for your page.

Parameters:
$file the path to the css file that is needed.

Definition at line 942 of file base-module.inc.php.

Referenced by BaseGallery::initSlideshow().

BaseModule::needsJs file  ) 
 

Add a javascript file to the page.

If you need any special js... use this!

Parameters:
$file the path to the file to be included.

Definition at line 966 of file base-module.inc.php.

Referenced by BaseMessage::__construct(), BaseTags::addPopularTagField(), ObjectManager::drawSearchForm(), BaseEvent::initEditPage(), BaseMap::initMainPage(), BaseGallery::initSlideshow(), and BaseObject::initViewPage().

BaseModule::needsSideBar  ) 
 

This function tells us whether we need to draw a sidebox or not.

Returns:
Boolean if we need a sidebar or not. This is based on if we have any boxes to display or not.

Definition at line 830 of file base-module.inc.php.

BaseModule::params key = null  ) 
 

This function is used to access the parameters of the object.

Parameters:
$key the key of the parameter you want to access.
Returns:
the value of the parameter... if it exists. false if it doesnt.

Definition at line 720 of file base-module.inc.php.

Referenced by ObjectManager::createSearchForm(), BaseImage::drawBulkConfigPage(), BaseImage::drawBulkFormPage(), BaseImage::drawBulkPostPage(), BaseCalendar::drawCalendarPage(), BaseRPSGame::drawChallengePage(), BaseCalendar::drawDatePage(), BaseUserAction::drawDoActionPage(), BaseForum::drawPostPage(), BaseUser::drawRegisterPage(), ObjectManager::drawRssLink(), ObjectManager::drawSearchPage(), BaseMessage::editFormAddFields(), BaseMessage::editFormLoad(), BaseCalendar::findDate(), BaseInvitations::getSearchLinks(), BaseInvitation::initApprovePage(), BaseEvent::initAttendPage(), BaseImage::initBulkConfigPage(), BaseImage::initBulkPostPage(), BaseCalendar::initCalendarPage(), BaseRPSGame::initChallengePage(), BaseCalendar::initDatePage(), BaseRPSGame::initDefendPage(), BaseObject::initDeletePage(), BaseInvitation::initDenyPage(), BaseUserAction::initDoActionPage(), BaseUser::initEditPage(), BaseObject::initEditPage(), BaseMessage::initEditPage(), BaseComment::initEditPage(), BaseTicket::initGatePage(), BaseEvent::initInvitePage(), BaseGroup::initJoinPage(), BaseGroup::initLeavePage(), BaseEvent::initLeavePage(), BaseUser::initLoginPage(), BaseThread::initMainPage(), BaseUserAction::initMessagePage(), BaseImage::initResizePage(), BaseEvent::initRSVPPage(), ObjectManager::initSearchPage(), BaseThread::initSearchPage(), BaseInvitations::initSearchPage(), ObjectManager::initSearchPageOutput(), BaseRPSGame::initTauntPage(), BaseEvent::initUnInvitePage(), BaseUser::initViewPage(), BaseTags::initViewPage(), BaseObject::initViewPage(), and BaseMessage::initViewPage().

BaseModule::parseModuleXml  ) 
 

This function generates the xml for the module.

Returns:
a simplexml object containing the xml of the module

Definition at line 705 of file base-module.inc.php.

Referenced by ObjectManager::getSearchWhere().

BaseModule::runCreateTableSql  ) 
 

this function actually runs our create table code.

extend this if you need to do any extra queries.

Reimplemented in BaseGroup.

Definition at line 1071 of file base-module.inc.php.

References dbExecute(), and CacheBot::delete().

BaseModule::setCachedPage data,
key = null
[static]
 

save the page as cached.

Parameters:
$data the page data

Definition at line 1110 of file base-module.inc.php.

References CacheBot::set().

Referenced by BaseJumper::start().

BaseModule::setError error  ) 
 

Sets the error message for the page.

Parameters:
$error an error string.

Definition at line 544 of file base-module.inc.php.

BaseModule::setParam key,
val
 

Update the value of a parameter for a page.

Parameters:
$key the key of the paramater you with to update.
$val the new value of the parameter

Definition at line 736 of file base-module.inc.php.

Referenced by BaseCalendar::findDate(), BaseCalendar::initPastPage(), BaseCalendar::initPopularPage(), ObjectManager::initSearchPage(), BaseCalendar::initUpcomingPage(), and BaseUser::initViewPage().

BaseModule::setTemplate BaseTemplate template  ) 
 

sets our template object.

Parameters:
the template object to set.

Definition at line 211 of file base-module.inc.php.

Referenced by BaseCrons::init(), ObjectManager::initAutocompleteOutput(), BaseImage::initBulkConfigPage(), BaseImage::initBulkPostPage(), ObjectManager::initJSONOutput(), BaseObject::initJSONPage(), BaseMap::initLookupPage(), BaseMap::initMapJsPage(), ObjectManager::initPHPOutput(), BaseObject::initPHPPage(), BaseImage::initResizePage(), ObjectManager::initRSSOutput(), ObjectManager::initXMLOutput(), and BaseObject::initXMLPage().

BaseModule::tryPageCache page = null  )  [static]
 

this function does two things: it generates a key and then uses that key to try the cache.

if it finds it, it shows the cached page and returns false. otherwise it returns the key for use in caching. it makes caching pages easy. have one call and an if statement that contains the setCache call.

Parameters:
$page the page / key you want to cache.
Returns:
the key to use in setPageCache()

Definition at line 1155 of file base-module.inc.php.


Member Data Documentation

BaseModule::$_Author = null
 

store the author of our module for our XML

Definition at line 106 of file base-module.inc.php.

BaseModule::$_Description = null
 

store the description of our module for our XML

Definition at line 96 of file base-module.inc.php.

BaseModule::$_Name = null
 

store the name of our module for our XML

Definition at line 91 of file base-module.inc.php.

BaseModule::$_Version = null
 

store the version of our module for our XML

Definition at line 101 of file base-module.inc.php.

BaseModule::$_Website = null
 

store the website of our module for our XML

Definition at line 111 of file base-module.inc.php.

BaseModule::$baseUrl
 

public String base url to use for creating links

Definition at line 16 of file base-module.inc.php.

BaseModule::$doCachePage = false
 

public are we caching the page?

Definition at line 46 of file base-module.inc.php.

BaseModule::$english
 

public Boolean an english word description of what the module is.

Definition at line 36 of file base-module.inc.php.

BaseModule::$error = null [private]
 

private Array of string errors for the page.

Definition at line 61 of file base-module.inc.php.

BaseModule::$Feeds = array() [static, private]
 

Array of RSS feeds for drawing in <head> of page.

Definition at line 81 of file base-module.inc.php.

BaseModule::$FeedTitles = array() [static, private]
 

corresponding array of titles for RSS feeds to be drawn

Definition at line 86 of file base-module.inc.php.

BaseModule::$navigation = array() [private]
 

private Array of text/links of navigation for the page.

May or may not be in future BaseModules

Definition at line 76 of file base-module.inc.php.

BaseModule::$page
 

public String what page we are on.

Definition at line 21 of file base-module.inc.php.

BaseModule::$pageCacheLife = 900 [static]
 

public the lifetime of the cached page.

defaults to 1 hour.

Definition at line 51 of file base-module.inc.php.

BaseModule::$pageTitle
 

public String title of the page we are on.

Definition at line 26 of file base-module.inc.php.

BaseModule::$params = array() [private]
 

private Keyed Array of parameters for the page.

Definition at line 56 of file base-module.inc.php.

BaseModule::$sideboxes = array() [private]
 

private Array of BaseBox objects for the page.

Definition at line 71 of file base-module.inc.php.

BaseModule::$status = array() [private]
 

private Array of string status messages for the page

Definition at line 66 of file base-module.inc.php.

BaseModule::$template = null
 

BaseTemplate our template to use to draw our page.

Definition at line 31 of file base-module.inc.php.

BaseModule::$xml
 

public String xml description of object.

derived from getPagesXml. this should probably be private.

Definition at line 41 of file base-module.inc.php.


The documentation for this class was generated from the following file:
Generated on Fri Oct 27 12:26:41 2006 for BaseJumper by doxygen 1.3.9.1