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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Wed Mar 5 16:10:20 2003 UTC (21 years, 5 months ago) by joko
Branch: MAIN
Changes since 1.1: +6 -3 lines
updated docu (phpDocumentor testing....)

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

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