WebBuilder2

AdvancedSearch | AreaMap ]

Search:

  HomePage   News   Getting Started Guide   WebBuilder2   CurrentStateOfAffairs  
  WebBuilder2   FeatureList   FrontController   LibraryPackages   ApplicationModules   ApplicationTemplates   Installation Instructions   ReleaseManagement  

Username:

Password:


Areas In
This Wiki

BEPHPUG

Conferences

emPHPower

LiveUser

Main

MDB2

PDO

PHPSVN

PHPTODO

RDBMS

WebBuilder2

Source: http://svn.oss.backendmedia.com/library/StageLoader.phps

The purpose of the StageLoader is to determine what page to load and what modules are contained in the page. This is done by reading the necessary data from the database. It also handles making instances of the necessary modules and finally it handles calling the modules in 3 stages, hence the name StageLoader.

stage1

  • determine if the user has the necessary access rights
  • determine if all required data is available (this is a fairly shallow test), like templates etc

stage2

  • process any user input, like inserting/updating/deleting of records in the database

stage3

  • generate the user output that is later passed onto the OutputWriter

The important bit is that every module can rewrite the configuration of the page as it was fetched from the database and thereby even have a different module handle the stage3 for example.

So you could implement the following:
You have a flight booking module and a shop module. The user goes through the booking module to find a flight. Once a flight is found the booking module creates an article inside the shop on the fly in the stage2 and then tells the shop module to handle the stage3. However if no flight was found the booking module continues to handle stage3 of course, since the booking module now first needs to find a proper flight before handing over the user to the shop module.

A more straightforward use of this feature is determine the accessrights in stage1 and then determing that instead of the current page the user should see a login page.

Also note that the StageLoader class is configurable in the system ini file.

WebBuilder2:StageLoader (82.140.19.67)
Mon, 02 May 2005, 14:35
[ Links | Source | History | RSS ]

This site powered by YaWiki 0.22 beta.


No user comments exist for this page.

Add A Comment
Email:
*Comment:
Catpcha:
* denotes required field

Your comment will be added immediately; please check your comments, and be nice. :-)

Please use plain text only; HTML and PHP code will be converted to entities.

Your email address will be obfuscated with [AT] and [DOT] after you post your comment.

FrontController
StageLoader
OutputWriter
ParameterHandling