/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/controller/WebMVC.inc
ViewVC logotype

Contents of /nfo/php/libs/com.newsblob.phphtmllib/controller/WebMVC.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Mon Mar 3 21:23:09 2003 UTC (21 years, 5 months ago) by joko
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +4 -1 lines
FILE REMOVED
- removed here

1 <?php
2
3 /**
4 * This file contains the phpHtmlLib::controller::WebMVC class,
5 * which inherits from the DesignPattern::MVC class.
6 *
7 * @author Andreas Motl <andreas.motl@ilo.de>
8 * @package phpHtmlLib
9 * @module controller::WebMVC
10 * @base DesignPattern::MVC
11 *
12 */
13
14 /**
15 * $Id: WebMVC.inc,v 1.3 2003/03/01 22:43:56 joko Exp $
16 *
17 * $Log: WebMVC.inc,v $
18 * Revision 1.3 2003/03/01 22:43:56 joko
19 * propagating options properly
20 *
21 * Revision 1.2 2003/03/01 21:19:02 joko
22 * now actually does something via '->handle'
23 * established static component registry here
24 *
25 * Revision 1.1 2003/03/01 17:02:09 joko
26 * + initial commit, inheriting from DesignPattern::MVC
27 *
28 *
29 */
30
31
32 /**
33 * This tries to implement some parts of the MVC Pattern
34 * suitable to work together with phpHtmlLib or maybe
35 * another Web-Framework written in php.
36 *
37 *
38 * @author Andreas Motl <andreas.motl@ilo.de>
39 * @copyright (c) 2003 - All Rights reserved.
40 * @license GNU LGPL (GNU Lesser General Public License)
41 *
42 * @author-url http://www.netfrag.org/~joko/
43 * @license-url http://www.gnu.org/licenses/lgpl.txt
44 *
45 * @package phpHtmlLib
46 * @module controller::WebMVC
47 * @base DesignPattern::MVC
48 *
49 */
50
51 /**
52 * Todo:
53 *
54 * o xyz
55 * o bla, bli, blub
56 *
57 *
58 */
59
60
61 // isn't required by now:
62 //loadModule('DesignPattern::Object');
63 //class DesignPattern_MVC extends DesignPattern_Object {
64
65 loadModule('DesignPattern::MVC');
66 class WebMVC extends DesignPattern_MVC {
67
68
69 /**
70 * The constructor ...
71 * ... just does nothing again.
72 *
73 * @param registry
74 */
75 function WebMVC() {
76 // new!!! user_setup (like phpHtmlLib... coming closer...)
77 $this->user_setup();
78 }
79
80 function user_setup() {
81 $this->_abstract_method('user_setup');
82 }
83
84 function handle() {
85
86 // trace
87 print "MVC - performed result: " . Dumper($this->_performed_result);
88 //exit;
89
90 if (!sizeof($this->_performed_result)) {
91 user_error("MVC failed - performed result was empty.");
92 }
93
94 // encapsulation here - no passthrough!!!
95 $result = array(
96 'view' => $this->_performed_result[view],
97 'options' => $this->_performed_result[options],
98 );
99
100 return $result;
101 }
102
103
104 function &getStaticRegistryDatabase() {
105 $registry = array (
106 '123435-54554-435435-435345' => array(
107 'name' => 'Page::Overview',
108 'version' => null,
109 ),
110 '456-54554-435435-435345' => array(
111 'name' => 'Page::Jobs',
112 'version' => null,
113 ),
114 '678-54554-435435-435345' => array(
115 'name' => 'Page::DataBrowser',
116 'version' => null,
117 ),
118 '555-54554-435435-435345' => array(
119 'name' => 'Page::NavigationHistory',
120 'version' => null,
121 ),
122 );
123 return $registry;
124 }
125
126
127
128 /*
129 function add_model() {
130 $this->_abstract_method('add_model');
131 }
132
133 function add_view() {
134 $this->_abstract_method('add_view');
135 }
136
137 function add_controller() {
138 $this->_abstract_method('add_controller');
139 }
140
141 function setup_views() {
142 $this->_abstract_method('setup_views');
143 }
144 */
145
146 }
147
148 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed