/[cvs]/nfo/php/libs/org.netfrag.glib/Site/WebAppMVC.php
ViewVC logotype

Contents of /nfo/php/libs/org.netfrag.glib/Site/WebAppMVC.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Tue Mar 11 01:22:27 2003 UTC (21 years, 5 months ago) by joko
Branch: MAIN
Changes since 1.3: +8 -2 lines
+ fixed metadata for phpDocumentor

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

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