| 1 | <?php | 
| 2 |  | 
| 3 | /** | 
| 4 | * This file contains the DesignPattern::MVC class. | 
| 5 | * | 
| 6 | * @author Andreas Motl <andreas.motl@ilo.de> | 
| 7 | * @package org.netfrag.glib | 
| 8 | */ | 
| 9 |  | 
| 10 | /** | 
| 11 | * $Id: ProxyDataSource.inc,v 1.2 2003/03/01 04:50:27 joko Exp $ | 
| 12 | * | 
| 13 | * $Log: ProxyDataSource.inc,v $ | 
| 14 | * | 
| 15 | */ | 
| 16 |  | 
| 17 |  | 
| 18 | /** | 
| 19 | * This tries to implement some parts of the MVC Model. | 
| 20 | * | 
| 21 | * | 
| 22 | * @author Andreas Motl <andreas.motl@ilo.de> | 
| 23 | * @copyright (c) 2003 - All Rights reserved. | 
| 24 | * @license GNU LGPL (GNU Lesser General Public License) | 
| 25 | * | 
| 26 | * @author-url http://www.netfrag.org/~joko/ | 
| 27 | * @license-url http://www.gnu.org/licenses/lgpl.txt | 
| 28 | * | 
| 29 | * @package org.netfrag.glib | 
| 30 | * @module Application::ComponentRegistry | 
| 31 | * | 
| 32 | */ | 
| 33 |  | 
| 34 | /** | 
| 35 | * Todo: | 
| 36 | * | 
| 37 | *  o xyz | 
| 38 | *  o bla, bli, blub | 
| 39 | * | 
| 40 | * | 
| 41 | */ | 
| 42 |  | 
| 43 |  | 
| 44 | // isn't required by now: | 
| 45 | //loadModule('DesignPattern::Object'); | 
| 46 | //class DesignPattern_MVC extends DesignPattern_Object { | 
| 47 |  | 
| 48 | class DesignPattern_MVC { | 
| 49 |  | 
| 50 | var $_model = NULL; | 
| 51 | var $_view = NULL; | 
| 52 | var $_controller = NULL; | 
| 53 |  | 
| 54 |  | 
| 55 | /** | 
| 56 | * The constructor ... | 
| 57 | *   ... just does nothing. | 
| 58 | * | 
| 59 | * @param registry | 
| 60 | */ | 
| 61 | function DesignPattern_MVC() { | 
| 62 | } | 
| 63 |  | 
| 64 | function _abstract_method($method) { | 
| 65 | print "Please implement code inside '$method'.<br/>"; | 
| 66 | } | 
| 67 |  | 
| 68 | function add_model() { | 
| 69 | $this->_abstract_method('add_model'); | 
| 70 | } | 
| 71 |  | 
| 72 | function add_view() { | 
| 73 | $this->_abstract_method('add_view'); | 
| 74 | } | 
| 75 |  | 
| 76 | function add_controller() { | 
| 77 | $this->_abstract_method('add_controller'); | 
| 78 | } | 
| 79 |  | 
| 80 | function setup_views() { | 
| 81 | $this->_abstract_method('setup_views'); | 
| 82 | } | 
| 83 |  | 
| 84 | } | 
| 85 |  | 
| 86 | ?> |