/[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.5 - (hide annotations)
Fri Apr 4 21:18:37 2003 UTC (21 years, 3 months ago) by joko
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +12 -11 lines
modified exception handling

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

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