Simple Web Presenter
An extremely basic CMS
 All Classes Files Functions Variables Pages
Public Member Functions | Protected Member Functions | List of all members
Page Class Reference
Inheritance diagram for Page:
Flag InputParser Sitemap

Public Member Functions

 addVariant ($value)
 
 getVariants ()
 
 __construct ($cache=null)
 
 mayCompress ()
 
 mayValidate ()
 
 startCompression ()
 
 generateContent ()
 
 cacheCheck ()
 
 genPage ()
 
 display ()
 

Protected Member Functions

 setCache ($cache)
 
 getCache ()
 

Detailed Description

Master class for generating a page

Constructor & Destructor Documentation

Page::__construct (   $cache = null)

Constructs a page

Parameters
$cacheoptionally sets a cache

Member Function Documentation

Page::cacheCheck ( )
abstract

Finishes all necessary processing to determine the cacheset of this page.

Returns
bool if this page may be cached
Page::display ( )

Displays the result from genPage.

Printing headers and content.

Page::generateContent ( )
abstract

Generates the actual content of the page

Returns
the content buffer
Page::genPage ( )

Generates an appropriate response to the request.

Eg. 304 NOT CHANGED, error message or the actual content

Page::getCache ( )
protected

Get the cache

Returns
The cache object
Page::mayCompress ( )

Decide wether or not this page may be compressed.

Normally this is a check for http headers, but some pages eg. pictures may not want to be compressed, and may override this function.

Returns
bool if this page may be compressed
Page::mayValidate ( )

Decide wether or not this page may be validated.

Normally this is a check for the option novalidate, but this may be overridden

Returns
bool if this page may be validated
Page::setCache (   $cache)
protected

Set the cache

Parameters
$cacheThe cache object
Page::startCompression ( )

Turns on compression for this page

Note
This may not be reversed

The documentation for this class was generated from the following file: