DiogenesPage Class Reference

Inheritance diagram for DiogenesPage:

Inheritance graph
[legend]
Collaboration diagram for DiogenesPage:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DiogenesPage ()
 display ($template, $master= '')
 doLogout ()
 getTemplate ()
 getTemplates ()
 httpStatus ($code)
 info ($msg)
 isLogged ()
 isRoot ()
 kill ($msg, $code=500)
 kill404 ($msg="")
 log ($action, $data="")
 makeMenu ()
 startSession ()
 templatePath ($template)
 toolbar ($title, $items)
 urlBarrel ($alias, $vhost, $rel="")

Public Attributes

 $dbh
 $head = array()
 $menu = array()
 $_dying = false

Detailed Description

This class describes a generic Diogenes page. This class is inherited to display barrel, admin or toplevel pages.

See also:
DiogenesBarrel DiogenesAdmin DiogenesToplevel

Definition at line 30 of file diogenes.page.inc.php.


Member Function Documentation

DiogenesPage::DiogenesPage (  ) 

The constructor.

Definition at line 47 of file diogenes.page.inc.php.

References DiogenesCorePage::DiogenesCorePage(), and DiogenesCorePage::url().

Referenced by DiogenesBarrel::DiogenesBarrel(), and DiogenesToplevel::DiogenesToplevel().

Here is the call graph for this function:

DiogenesPage::display ( template,
master = '' 
)

Display a Smarty template.

Parameters:
$template the template for the current page
$master the master template

Definition at line 77 of file diogenes.page.inc.php.

References getTemplate(), makeMenu(), and DiogenesCorePage::url().

Referenced by DiogenesBarrel::doContent(), and kill().

Here is the call graph for this function:

DiogenesPage::doLogout (  ) 

Perform a logout. This should destroy both the session and the logger objects.

Definition at line 99 of file diogenes.page.inc.php.

References log().

Referenced by DiogenesToplevel::DiogenesToplevel(), and DiogenesBarrel::doContent().

Here is the call graph for this function:

DiogenesPage::getTemplate (  ) 

Returns the master template for the current context.

Reimplemented in DiogenesAdmin.

Definition at line 110 of file diogenes.page.inc.php.

References templatePath().

Referenced by display(), DiogenesBarrel::doPage(), and DiogenesAdmin::getTemplate().

Here is the call graph for this function:

DiogenesPage::getTemplates (  ) 

Returns the available master templates.

Reimplemented in DiogenesBarrel.

Definition at line 126 of file diogenes.page.inc.php.

DiogenesPage::httpStatus ( code  ) 

Send an HTTP status header.

Parameters:
code the HTTP status code

Definition at line 147 of file diogenes.page.inc.php.

Referenced by kill().

DiogenesPage::info ( msg  ) 

Report an information.

Parameters:
msg 

Definition at line 165 of file diogenes.page.inc.php.

Referenced by kill404().

DiogenesPage::isLogged (  ) 

Is the user logged in ?

Definition at line 171 of file diogenes.page.inc.php.

Referenced by DiogenesToplevel::makeMenu(), and DiogenesBarrel::makeMenu().

DiogenesPage::isRoot (  ) 

Is the user a root ("toplevel") admin ?

Definition at line 177 of file diogenes.page.inc.php.

Referenced by DiogenesToplevel::makeMenu().

DiogenesPage::kill ( msg,
code = 500 
)

Die and display an error message.

Parameters:
$msg the message to display
$code the HTTP status code to send

Definition at line 187 of file diogenes.page.inc.php.

References display(), and httpStatus().

Referenced by DiogenesBarrel::checkPerms(), DiogenesAdmin::DiogenesAdmin(), DiogenesToplevel::DiogenesToplevel(), kill404(), and templatePath().

Here is the call graph for this function:

DiogenesPage::kill404 ( msg = ""  ) 

Display the dreaded "file not found page".

Parameters:
msg optional extra error message

Definition at line 211 of file diogenes.page.inc.php.

References info(), and kill().

Referenced by DiogenesBarrel::DiogenesBarrel(), and DiogenesBarrel::doContent().

Here is the call graph for this function:

DiogenesPage::log ( action,
data = "" 
)

Log an information.

Parameters:
action 
data 

Definition at line 223 of file diogenes.page.inc.php.

Referenced by doLogout().

DiogenesPage::makeMenu (  ) 

Make the menu.

Reimplemented in DiogenesAdmin, DiogenesBarrel, and DiogenesToplevel.

Definition at line 231 of file diogenes.page.inc.php.

Referenced by display().

DiogenesPage::startSession (  ) 

Start session handling.

Definition at line 238 of file diogenes.page.inc.php.

Referenced by DiogenesAdmin::DiogenesAdmin(), DiogenesToplevel::DiogenesToplevel(), and DiogenesBarrel::doContent().

DiogenesPage::templatePath ( template  ) 

Returns the path to a given template.

Reimplemented in DiogenesBarrel.

Definition at line 248 of file diogenes.page.inc.php.

References kill().

Referenced by getTemplate().

Here is the call graph for this function:

DiogenesPage::toolbar ( title,
items 
)

Adds a toolbar to the top of the page.

Parameters:
title 
items 

Definition at line 269 of file diogenes.page.inc.php.

DiogenesPage::urlBarrel ( alias,
vhost,
rel = "" 
)

Returns the URL to a Diogenes barrel.

Parameters:
alias 
vhost 
rel 

Definition at line 280 of file diogenes.page.inc.php.


Member Data Documentation

DiogenesPage::$dbh

Handle to database

Definition at line 34 of file diogenes.page.inc.php.

DiogenesPage::$head = array()

An array holding the contents of the 'head' tag

Definition at line 37 of file diogenes.page.inc.php.

DiogenesPage::$menu = array()

An array of items for the 'menu' area

Definition at line 40 of file diogenes.page.inc.php.

DiogenesPage::$_dying = false

Whether we're into kill() or not

Definition at line 43 of file diogenes.page.inc.php.


The documentation for this class was generated from the following file:
Generated on Fri Jan 11 01:20:09 2008 for Diogenes by  doxygen 1.5.1