ContentViewBase Class Reference
[View]
Base class for Views that produce content. More...
Public Member Functions |
|
__construct ($name, $page_data) | |
Contructor takes a name and the page data.
|
|
get_page_data () | |
Returns
PageData. |
|
render ($policy=self::NONE) | |
Process view and returnd the created
content. |
|
Protected Member Functions |
|
assign_default_vars ($policy) | |
Assign all default vars. |
|
Protected Attributes |
|
$page_data = null |
Detailed Description
Base class for Views that produce content.
Definition at line 10 of file contentviewbase.cls.php.
Constructor & Destructor Documentation
ContentViewBase::__construct | ( | $ | name, | |
$ | page_data | |||
) |
Contructor takes a name and the page data.
Reimplemented from ViewBase.
Reimplemented in MimeView.
Definition at line 21 of file contentviewbase.cls.php.
00021 { 00022 parent::__construct($name, ''); 00023 if (empty($page_data)) { 00024 throw new Exception('ContentView called with empty PageData'); 00025 } 00026 $this->page_data = $page_data; 00027 }
Member Function Documentation
ContentViewBase::assign_default_vars | ( | $ | policy | ) | [protected] |
Assign all default vars.
- Parameters:
-
int $policy If set to IView::DISPLAY, content is printed, if false it is returned only
Reimplemented from ViewBase.
Definition at line 40 of file contentviewbase.cls.php.
00040 { 00041 parent::assign_default_vars($policy); 00042 $this->assign('page_data', $this->page_data); 00043 if ($this->page_data->router) { 00044 $this->assign('route_id', $this->page_data->router->get_route_id()); 00045 } 00046 }
ContentViewBase::get_page_data | ( | ) |
ContentViewBase::render | ( | $ | policy =
self::NONE |
) |
Process view and returnd the created content.
The control flow on rendering is as follows:
A) If item is not cached or caching is disabled
1. render_preprocess 2. render_from_cache 3. do_render 3.1 before_render 3.2 render_content 3.3 after_render 4. update_cache 4.1 store_cache (if item should be cached) 5. render_postprocess
B) If item is cached and caching is enabled
1. render_preprocess 2. render_from_cache 2.1 do_render_cache 3. update_cache 4. render_postprocess
- Parameters:
-
int $policy If set to IView::DISPLAY, content is printed, if false it is returned only
- Returns:
- string The rendered content
Reimplemented from ViewBase.
Definition at line 29 of file contentviewbase.cls.php.
00029 { 00030 $ret = parent::render($policy); 00031 $this->page_data->content = $ret; 00032 return $ret; 00033 }
Member Data Documentation
ContentViewBase::$page_data = null
[protected] |
Definition at line 16 of file contentviewbase.cls.php.
The documentation for this class was generated from the following file:
- gyro/core/view/base/contentviewbase.cls.php