Class Page

Description

The Page class provides functions web pages handling like:

  • display URLs, CSS, templates, etc
  • redirections
  • abstract page parameters management
  • access to the authentication layer (via the Auth class)
Templates must always use this class, when the needed functionality is provided.

Located in /Page.class (line 42)


	
			
Variable Summary
mixed $auth
mixed $error
mixed $feedable
mixed $module
mixed $name
mixed $params
mixed $title
mixed $user
mixed $_rawoutput
mixed $_tplvars
Method Summary
Page Page (string $module, [optional $title = ""], [mixed $name = ""])
void css ([optional $module = ""])
void cssUrl (optional 0)
void customTemplate (string $template)
string dateUrl ([optional $module = ""], [optional $params = ""], [optional $full = false], [optional $rawsep = false])
void display ()
string get ()
void getName ()
string module ()
void newsUrl ([optional $item = ""], [optional $params = ""])
void process (string $module)
void redirect ([optional $module = ""], [optional $params = ""])
void rss2Url ([optional $params = array()])
string selfUrl ([optional $module = ""], [optional $params = ""])
void setRawOutput ()
void setTplVar (strin $varname, mixed $varcontent)
void siteUrl ()
void template (string $module)
string url ([optional $module = ""], [optional $params = ""], [optional $full = false], [optional $rawsep = false])
Variables
mixed $auth (line 53)
mixed $error (line 59)
mixed $feedable (line 65)
mixed $module (line 50)
mixed $name = "" (line 47)
mixed $params (line 62)
mixed $title (line 44)
mixed $user (line 56)
mixed $_rawoutput = false (line 68)
mixed $_tplvars = array() (line 71)
Methods
Constructor Page (line 83)

Constructor - creates a new web page taking the proper security measures and all other necessary steps.

Creates a page instance of the given web module

Page Page (string $module, [optional $title = ""], [mixed $name = ""])
  • string $module: The web module to create
  • optional $title: array $title The page title
css (line 386)

Return CSS for the given module

  • static:
  • access: public
void css ([optional $module = ""])
  • optional $module: string $module The template CSS to be displayed
cssUrl (line 248)

Returns CSS public URL for the given web module If module is not given, just return the common CSS.

  • static:
  • access: public
void cssUrl (optional 0)
  • optional 0: string $module The web module whose CSS is to be returned
customTemplate (line 361)

Display the given configuration template (if exists). See config/README for more information.

  • static:
  • access: public
void customTemplate (string $template)
  • string $template: The template name
dateUrl (line 197)

Returns public URL for the given web module keeping the active date (d) parameter

  • access: public
string dateUrl ([optional $module = ""], [optional $params = ""], [optional $full = false], [optional $rawsep = false])
  • optional $module: string $module See Page::url() for info
  • optional $params: array $params See Page::url() for info
  • optional $full: boolean $full See Page::url() for info
  • optional $rawsep: boolean $rawsep See Page::url() for info
display (line 303)

Display the current page

  • access: public
void display ()
get (line 317)

Return the current page module as a string

  • access: public
string get ()
getName (line 437)

Return page name (if available), otherwise return page title

  • access: public
void getName ()
module (line 110)

Returns a the page module name

  • return: the name of the module
string module ()
newsUrl (line 263)

Returns the news page URL for the given item (area, site, category, user or subscription)

  • static:
  • access: public
void newsUrl ([optional $item = ""], [optional $params = ""])
  • optional $item: string $item The item whose news page is to be returned
  • optional $params: string $params Additional parameters (optional)
process (line 406)

Process a web module

  • static:
  • access: public
void process (string $module)
  • string $module: Module to be processed
redirect (line 222)

Redirects browser to the given module If the module is omitted, redirectsi to the home page.

This function can be used statically (via Page::) or through a real class method (in which case the current parameters will be passed to the new module)

  • static:
  • access: public
void redirect ([optional $module = ""], [optional $params = ""])
  • optional $module: string $module The web module
  • optional $params: array $params Optional module parameters as an associative array of $key => $value
rss2Url (line 289)

Returns the RSS2 feed URL. If params are not given, and the function is not called statically then the current page parameters are used.

  • static:
  • access: public
void rss2Url ([optional $params = array()])
  • optional $params: string $type The type of the feed. Only rss2 is supported at this time.
selfUrl (line 177)

Returns URL based on the active web module and its parameters

  • access: public
string selfUrl ([optional $module = ""], [optional $params = ""])
  • optional $module: string $module The web module. If omitted current web module is used.
  • optional $params: array $params Module parameters. If omitted, current parameterse are passed.
setRawOutput (line 428)

Set raw output for this page. Must be called before any output is shown

  • static:
  • access: public
void setRawOutput ()
setTplVar (line 374)

Adds the given variable to the local template variables

  • static:
  • access: public
void setTplVar (strin $varname, mixed $varcontent)
  • strin $varname: The variable name
  • mixed $varcontent: The variable content
siteUrl (line 234)

Returns the public site full URL

  • static:
  • access: public
void siteUrl ()
template (line 335)

Display the template for the given page module

  • static:
  • access: public
void template (string $module)
  • string $module: The module to be displayed
url (line 134)

Returns public URL for the given web module If the module is omitted, returns the home page URL

  • static:
  • access: public
string url ([optional $module = ""], [optional $params = ""], [optional $full = false], [optional $rawsep = false])
  • optional $module: string $module The web module
  • optional $params: array $params Optional module parameters as an associative array of $key => $value If $params is not an array, then the internal parameters (set when the page was displayed) are used.
  • optional $full: boolean $full Return full URL instead of relative one (ie. include hostname)
  • optional $rawsep: boolean $rawsep Use & instead of & as URL parameter separator

Documentation generated on Sat, 18 Mar 2006 04:40:17 -0300 by phpDocumentor 1.3.0RC3