00001 <?php
00002 require_once dirname(__FILE__) . '/renderdecoratorbase.cls.php';
00003
00004
00005
00006
00007
00008
00009
00010 class DispatcherInvokeRenderDecorator extends RenderDecoratorBase {
00011
00012
00013
00014
00015
00016 protected $dispatcher;
00017
00018
00019
00020
00021
00022
00023 public function __construct($dispatcher) {
00024 $this->dispatcher = $dispatcher;
00025 }
00026
00027
00028
00029
00030
00031
00032
00033 public function render_content($page_data) {
00034 $this->dispatcher->invoke($page_data);
00035 }
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 public function render_page($page_data, $content_render_decorator, $policy = IView::NONE) {
00046 $view = ViewFactory::create_view(IViewFactory::PAGE, $page_data->page_template, $page_data);
00047 if ($view->is_cached() == false) {
00048 $page_data->router->preprocess($page_data);
00049 $content_render_decorator->render_content($page_data);
00050 $page_data->router->postprocess($page_data);
00051 }
00052 return $view->render($policy);
00053 }
00054 }