/[cvs]/nfo/php/libs/org.netfrag.app/WebExplorer/Module/AbstractGUIModule.php
ViewVC logotype

Contents of /nfo/php/libs/org.netfrag.app/WebExplorer/Module/AbstractGUIModule.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations)
Fri Apr 4 00:56:08 2003 UTC (21 years, 5 months ago) by jonen
Branch: MAIN
Changes since 1.2: +14 -3 lines
+ add 'mungle_adapter' function

1 <?
2 /*
3 ## -----------------------------------------------------------------------------
4 ## $Id: AbstractGUIModule.php,v 1.2 2003/03/20 07:56:18 jonen Exp $
5 ## -----------------------------------------------------------------------------
6 ## $Log: AbstractGUIModule.php,v $
7 ## Revision 1.2 2003/03/20 07:56:18 jonen
8 ## + added docu
9 ##
10 ## Revision 1.1 2003/03/20 03:49:22 jonen
11 ## + initial commit
12 ##
13 ## Revision 1.1 2003/03/01 22:57:23 cvsmax
14 ## + inital commit
15 ##
16 ##
17 ## -----------------------------------------------------------------------------
18 */
19
20 /**
21 * AbstractGUIModule class provides an simple way to create new modules
22 * for the Explorer, eg navigation or data browsing elements.
23 *
24 * @author Sebastian Utz <seut@tunemedia.de>
25 * @package org.netfrag.app
26 * @name WebExplorer::Module::AbstractModule
27 */
28
29
30 class WebExplorer_Module_AbstractGUIModule {
31
32
33 /**
34 * most modules needs arguments e.g. data_locator_key, caption etc.
35 */
36 var $_args = array();
37
38 /**
39 * variable thats holds the reference to phphtmllib GUI object
40 */
41 var $_gui_object;
42
43 /**
44 * the contructor
45 *
46 * @params struct - the arguments
47 */
48 function WebExplorer_Module_AbstractGUIModule($args = array()) {
49 $this->_args = $args;
50
51 $this->set_gui_object();
52 //print Dumper($this->_gui_object);
53 }
54
55
56 function set_gui_object() {
57 user_error("AbstractGUIModule::set_gui_object() - Child must override");
58 }
59
60
61 function add_hidden_items($items) {
62 foreach($items as $label => $value) {
63 $this->add_hidden_item($label, $value);
64 }
65 }
66
67 function add_hidden_item($label, $value) {
68 //print "Label: $label => $value<br>";
69 $this->_gui_object->add_hidden_element($label, $value);
70 }
71
72 function &get() {
73 if($this->_args['adapter']) {
74 return $this->mungle_adapter($this->_args['adapter']);
75 } else {
76 return $this->_gui_object;
77 }
78 }
79
80 function mungle_adapter($label) {
81 return php::mkInstance($label, array(&$this->_gui_object));
82 }
83
84 }
85
86 ?>

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