.

StaticPageRoute Class Reference

This routes a static page to action_static(). More...

Inheritance diagram for StaticPageRoute:
ExactMatchRoute RouteBase IRoute IDispatcher IUrlBuilder

List of all members.

Public Member Functions

  __construct ($prefix, $page, $postfix, $template, $controller, $action, $decorators=null)
  Contructor.

Protected Member Functions

  invoke_action_func ($controller, $funcname, $page_data)
  Invokes given action function on given controller.

Protected Attributes

  $org_action
  $org_page

Detailed Description

This routes a static page to action_static().

Definition at line 5 of file staticpageroute.cls.php.


Constructor & Destructor Documentation

StaticPageRoute::__construct ( prefix,
page,
postfix,
template,
controller,
action,
decorators = null  
)

Contructor.

Parameters:
string  $prefix Part before static page, e.g. a directory
string  $page The static page this route is responsible for
string  $prefix Part after page, e.g. ".html"
IController  $controller The controller to invoke
string  $action The function to invoke on controller
mixed  Array or single instance of IRouteDecorator

Definition at line 19 of file staticpageroute.cls.php.

00019                                                                                                                    {
00020                 $this->org_page = $template;
00021                 $this->org_action = $action;
00022                 $page_action = 'static_' . $page;
00023                 parent::__construct($prefix . $page . $postfix, $controller, $page_action, $decorators);                        
00024         }

Member Function Documentation

StaticPageRoute::invoke_action_func ( controller,
funcname,
page_data  
) [protected]

Invokes given action function on given controller.

Parameters:
IController  $controller The controller to invoke action upon
string  $funcname The function to invoke
PageData  $page_data
Exceptions:
Exception  if function does not exist on controller
Returns:
mixed Status

Reimplemented from RouteBase.

Definition at line 35 of file staticpageroute.cls.php.

00035                                                                                   {
00036                 $funcname = $this->get_action_func_name($this->org_action);
00037                 $this->check_action_func($controller, $funcname);
00038                 return $this->controller->$funcname($page_data, $this->org_page);               
00039         }       

Member Data Documentation

StaticPageRoute::$org_action [protected]

Definition at line 7 of file staticpageroute.cls.php.

StaticPageRoute::$org_page [protected]

Definition at line 6 of file staticpageroute.cls.php.


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