1 |
<? |
<? |
2 |
|
/** |
3 |
|
* This file contains the Data::Lift component. |
4 |
|
* |
5 |
|
* @author Andreas Motl <andreas.motl@ilo.de> |
6 |
|
* @package org.netfrag.glib |
7 |
|
* @name Data::Lift |
8 |
|
* |
9 |
|
*/ |
10 |
|
|
11 |
// ------------------------------------------------------------------------- |
// ------------------------------------------------------------------------- |
12 |
// $Id$ |
// $Id$ |
13 |
// ------------------------------------------------------------------------- |
// ------------------------------------------------------------------------- |
14 |
// $Log$ |
// $Log$ |
15 |
|
// Revision 1.6 2003/03/09 15:49:20 joko |
16 |
|
// fix towards optimizing autodocumentation: |
17 |
|
// enriched with metadata to tell autodia how to build object-relationships by discarding the fancy namespacing stuff there |
18 |
|
// |
19 |
|
// Revision 1.5 2003/03/08 20:04:59 root |
20 |
|
// + optimized comments for Autodia |
21 |
|
// |
22 |
|
// Revision 1.4 2003/03/08 18:22:23 joko |
23 |
|
// updated comments: now in phpDocumentor style |
24 |
|
// |
25 |
// Revision 1.3 2003/03/03 21:28:11 joko |
// Revision 1.3 2003/03/03 21:28:11 joko |
26 |
// updated comments |
// updated comments |
27 |
// |
// |
36 |
// ------------------------------------------------------------------------- |
// ------------------------------------------------------------------------- |
37 |
|
|
38 |
|
|
|
// Data::Lift - Pass data around between various "actors". |
|
|
// |
|
|
// These "actors" are kinda plugin-modules |
|
|
// lying at "locations" and actually mungle the data. |
|
|
// |
|
|
// "Locations" are by now: |
|
|
// x local filesystem |
|
|
// o remote anything |
|
|
// |
|
|
// The "actors" require (by now) to be native php classes |
|
|
// having a method "perform". Please have a look at others |
|
|
// lying in the Data::Lift namespace at org.netfrag.glib to |
|
|
// get a picture of how to implement own "actors". |
|
|
// |
|
|
// @url: http://cvs.netfrag.org/php/libs/org.netfrag.glib |
|
|
// |
|
|
// TODO: |
|
|
// o refactor Data::Deep to a plugin module |
|
|
// o refactor Data::Encode to a plugin module |
|
|
// o combine Data::Lift and Data::Container somehow |
|
|
// o integrate with Data::Driver somehow -- proposal: |
|
|
// $lift = new Data::Lift($locator); |
|
|
// $lift->perform(); // talks to a Data::Driver |
|
|
// |
|
39 |
|
|
40 |
|
|
41 |
|
/** |
42 |
|
* --- Data::Lift |
43 |
|
* |
44 |
|
* <pre> |
45 |
|
* Data::Lift - Pass data around between various "actors". |
46 |
|
* |
47 |
|
* These "actors" are kinda plugin-modules |
48 |
|
* lying at "locations" and actually mungle the data. |
49 |
|
* |
50 |
|
* "Locations" are by now: |
51 |
|
* x local filesystem |
52 |
|
* o remote anything |
53 |
|
* |
54 |
|
* The "actors" require (by now) to be native php classes |
55 |
|
* having a method "perform". Please have a look at others |
56 |
|
* lying in the Data::Lift namespace at org.netfrag.glib to |
57 |
|
* get a picture of how to implement own "actors". |
58 |
|
* </pre> |
59 |
|
* |
60 |
|
* |
61 |
|
* @author Andreas Motl <andreas.motl@ilo.de> |
62 |
|
* @copyright (c) 2003 - All Rights reserved. |
63 |
|
* @license GNU LGPL (GNU Lesser General Public License) |
64 |
|
* |
65 |
|
* @link http://www.netfrag.org/~joko/ |
66 |
|
* @link http://www.gnu.org/licenses/lgpl.txt |
67 |
|
* |
68 |
|
* @package org.netfrag.glib |
69 |
|
* @subpackage DataLift |
70 |
|
* @name Data::Lift |
71 |
|
* |
72 |
|
* @link http://cvs.netfrag.org/php/libs/org.netfrag.glib |
73 |
|
* |
74 |
|
* |
75 |
|
* @todo refactor Data::Deep to a plugin module |
76 |
|
* @todo refactor Data::Encode to a plugin module |
77 |
|
* @todo combine Data::Lift and Data::Container somehow |
78 |
|
* @todo integrate with Data::Driver somehow -- proposal: |
79 |
|
* // $lift = ne w Data::Lift($locator); |
80 |
|
* // $lift->perform(); // talks to a Data::Driver |
81 |
|
* |
82 |
|
* |
83 |
|
*/ |
84 |
class Data_Lift { |
class Data_Lift { |
85 |
|
|
86 |
|
/** |
87 |
|
* this is to trick Autodia let understanding "namespaces" in php |
88 |
|
* unless the pattern can be tweaked by mode (namespace=0|1) |
89 |
|
* // $this = ne w Data::Lift(&$payload, $options = array()); |
90 |
|
*/ |
91 |
|
|
92 |
var $dblocations; |
var $dblocations; |
93 |
var $actor; |
var $actor; |
94 |
|
var $actor_instance; |
95 |
|
|
96 |
var $payload; |
var $payload; |
97 |
var $vartype; |
var $vartype; |
181 |
function &_perform_actor() { |
function &_perform_actor() { |
182 |
//$actor_file = join('/', $this->actor) . '.php'; |
//$actor_file = join('/', $this->actor) . '.php'; |
183 |
//include($actor_file); |
//include($actor_file); |
184 |
|
|
185 |
|
/** |
186 |
|
* <!-- Autodia --> |
187 |
|
* can do: (this is metadata supplied for Autodia, don't delete!) |
188 |
|
* $this->_actor_instance = new Data_Lift_hash_job_html() |
189 |
|
* $this->_actor_instance = new Data_Lift_hash_tree_PEAR_Tree() |
190 |
|
* $this->_actor_instance = new Data_Lift_object_tree_common_PEAR_HTML_TreeMenu() |
191 |
|
* $this->_actor_instance = new Data_Lift_object_tree_common_PEAR_HTML_TreeMenu_DHTML() |
192 |
|
* $this->_actor_instance = new Data_Lift_object_tree_common_PEAR_HTML_TreeMenu_Listbox() |
193 |
|
* |
194 |
|
*/ |
195 |
|
|
196 |
$actor_name = 'Data/Lift/' . join('/', $this->actor); |
$actor_name = 'Data/Lift/' . join('/', $this->actor); |
197 |
$actor_object = mkObject($actor_name); |
$actor_object = mkObject($actor_name); |
198 |
return $actor_object->perform($this->payload); |
return $actor_object->perform($this->payload); |
208 |
|
|
209 |
} |
} |
210 |
|
|
|
?> |
|
211 |
|
?> |