| 1 |
joko |
1.1 |
<?php |
| 2 |
|
|
|
| 3 |
|
|
/** |
| 4 |
|
|
* This file contains the abstract Application::Request::BaseController class. |
| 5 |
|
|
* |
| 6 |
|
|
* @author Andreas Motl <andreas.motl@ilo.de> |
| 7 |
|
|
* @package org.netfrag.glib |
| 8 |
|
|
* @module Application::Request::BaseController |
| 9 |
|
|
* |
| 10 |
|
|
*/ |
| 11 |
|
|
|
| 12 |
|
|
/** |
| 13 |
|
|
* $Id: MVC.php,v 1.2 2003/03/01 16:53:57 joko Exp $ |
| 14 |
|
|
* |
| 15 |
|
|
* $Log: MVC.php,v $ |
| 16 |
|
|
* |
| 17 |
|
|
*/ |
| 18 |
|
|
|
| 19 |
|
|
|
| 20 |
|
|
/** |
| 21 |
|
|
* --- |
| 22 |
|
|
* |
| 23 |
|
|
* |
| 24 |
|
|
* @author Andreas Motl <andreas.motl@ilo.de> |
| 25 |
|
|
* @copyright (c) 2003 - All Rights reserved. |
| 26 |
|
|
* @license GNU LGPL (GNU Lesser General Public License) |
| 27 |
|
|
* |
| 28 |
|
|
* @author-url http://www.netfrag.org/~joko/ |
| 29 |
|
|
* @license-url http://www.gnu.org/licenses/lgpl.txt |
| 30 |
|
|
* |
| 31 |
|
|
* @package org.netfrag.glib |
| 32 |
|
|
* @module Application::Request::BaseController |
| 33 |
|
|
* |
| 34 |
|
|
*/ |
| 35 |
|
|
|
| 36 |
|
|
/** |
| 37 |
|
|
* Todo: |
| 38 |
|
|
* |
| 39 |
|
|
* o xyz |
| 40 |
|
|
* o bla, bli, blub |
| 41 |
|
|
* |
| 42 |
|
|
* |
| 43 |
|
|
*/ |
| 44 |
|
|
|
| 45 |
|
|
|
| 46 |
|
|
// isn't required by now: |
| 47 |
|
|
//loadModule('DesignPattern::Object'); |
| 48 |
|
|
//class DesignPattern_MVC extends DesignPattern_Object { |
| 49 |
|
|
|
| 50 |
|
|
//loadModule('DesignPattern::Container'); |
| 51 |
|
|
class Application_Request_BaseController { |
| 52 |
|
|
|
| 53 |
|
|
var $_request = null; |
| 54 |
|
|
|
| 55 |
|
|
var $_rules = null; |
| 56 |
|
|
|
| 57 |
|
|
|
| 58 |
|
|
/** |
| 59 |
|
|
* The constructor ... |
| 60 |
|
|
* ... just does nothing. |
| 61 |
|
|
* |
| 62 |
|
|
* @param registry |
| 63 |
|
|
*/ |
| 64 |
|
|
function Application_Request_BaseController() { |
| 65 |
|
|
} |
| 66 |
|
|
|
| 67 |
|
|
function _abstract_method($method) { |
| 68 |
|
|
$package = get_class($this); |
| 69 |
|
|
print "$package: Please implement method '$method'.<br/>"; |
| 70 |
|
|
} |
| 71 |
|
|
|
| 72 |
|
|
/* |
| 73 |
|
|
function set_request() { |
| 74 |
|
|
$this->_abstract_method('set_request'); |
| 75 |
|
|
} |
| 76 |
|
|
*/ |
| 77 |
|
|
|
| 78 |
|
|
// called from parent context |
| 79 |
|
|
function set_request(&$request) { |
| 80 |
|
|
$this->_request = &$request; |
| 81 |
|
|
} |
| 82 |
|
|
|
| 83 |
|
|
// called from DesignPattern::MVC |
| 84 |
|
|
function set_rules(&$rules) { |
| 85 |
|
|
$this->_rules = &$rules; |
| 86 |
|
|
} |
| 87 |
|
|
|
| 88 |
|
|
function &get_request() { |
| 89 |
|
|
return $this->_request; |
| 90 |
|
|
} |
| 91 |
|
|
|
| 92 |
|
|
} |
| 93 |
|
|
|
| 94 |
|
|
?> |