Table of Contents
Page Management consists of a collection of functions:
This function is to be called with an array of page features/classname pairs. Valid features are:
sess : This page makes use of session variables.
auth : This page uses session authentication. If you specify the auth feature, you MUST specify the sess feature, also.
perm : This page is protected by permissions and only accessible to authenticated users with matching rights. If you specify the perm feature, you MUST specify the auth and sess features, also.
user : This page makes use of user variables. If you specify the user feature, you MUST specify the auth and sess features, also.
Each feature specifies the name of the class that implements that feature, for example
page_open(array("sess" => "Shop_Session"));The function creates an instance of Shop_Session as $sess and initializes it. It also checks feature dependencies. Note that you are expected to provide an implementation of the class Shop_Session. This is usually done in local.inc and usually you do so by extending the provided Session class.
Examples on how to do this is given in the documentation later when the classes are introduced.
At the end of your page (after all results have been calculated) you have to call page_close(). This will save all page state, session and user variables into database. Changes to session or user variables after page_close() has been called are not recorded. It is recommended that you call page_close() only once on your page.