4 |
## $Id$ |
## $Id$ |
5 |
## ----------------------------------------------------------------------------- |
## ----------------------------------------------------------------------------- |
6 |
## $Log$ |
## $Log$ |
7 |
|
## Revision 1.2 2003/03/01 15:17:26 jonen |
8 |
|
## + explorer pointers |
9 |
|
## + new proposal for internal data structure |
10 |
|
## |
11 |
|
## CV:S ------------------------------<BS> |
12 |
|
## |
13 |
## Revision 1.1 2003/02/28 04:14:48 joko |
## Revision 1.1 2003/02/28 04:14:48 joko |
14 |
## + initial commit |
## + initial commit |
15 |
## |
## |
19 |
|
|
20 |
class Application_RequestTracker { |
class Application_RequestTracker { |
21 |
|
|
22 |
|
// raw - $_GET and $_POST (merged) |
23 |
|
var $request; |
24 |
|
|
25 |
|
// variables to hold some stacks and pointers - two features / specs |
26 |
|
// 1. are kept persistent (session!) under the hood (automagically) |
27 |
|
// 2. plugin-namespace - this applies: |
28 |
|
// $this->pointers[$name][...][...] = |
29 |
|
// $this->stacks[$name][...][...] = |
30 |
|
//var $pointers; |
31 |
|
//var $stacks; |
32 |
var $data; |
var $data; |
33 |
|
|
34 |
function Application_RequestTracker() { |
function Application_RequestTracker() { |
61 |
|
|
62 |
function setPointer($explicit = null) { |
function setPointer($explicit = null) { |
63 |
if (!$explicit) { |
if (!$explicit) { |
64 |
$this->data[pointer] = $this->data[history][sizeof($this->data[history]) - 1]; |
$this->data['pointer'] = $this->data[history][sizeof($this->data[history]) - 1]; |
65 |
} |
} |
66 |
//print "pointer: " . Dumper($this->data[pointer]) . "<br/>"; |
//print "pointer: " . Dumper($this->data[pointer]) . "<br/>"; |
67 |
} |
} |
94 |
$pser = join( '<br/>', array( $s_keys, $s_component, $s_request ) ); |
$pser = join( '<br/>', array( $s_keys, $s_component, $s_request ) ); |
95 |
return $pser; |
return $pser; |
96 |
} |
} |
97 |
|
|
98 |
|
function addExplorer($data) { |
99 |
|
$this->data['explorer'][] = $data; |
100 |
|
$this->setExplorerPointer(); |
101 |
|
$this->save(); |
102 |
|
} |
103 |
|
|
104 |
|
function setExplorerPointer($explicit = null) { |
105 |
|
if (!$explicit) { |
106 |
|
$this->data['explorer_pointer'] = $this->data['explorer'][sizeof($this->data['explorer']) - 1]; |
107 |
|
} |
108 |
|
} |
109 |
|
|
110 |
|
function getExplorerPointer($pointer = null) { |
111 |
|
if(!$pointer) { |
112 |
|
return $this->data['explorer_pointer']; |
113 |
|
} |
114 |
|
} |
115 |
|
|
116 |
|
function resetExplorer() { |
117 |
|
unset $this->data['explorer']; |
118 |
|
unset $this->data['explorer_pointer']; |
119 |
|
} |
120 |
|
|
121 |
|
|
122 |
|
|
123 |
|
/* |
124 |
|
function register_plugin($name) { |
125 |
|
// reserve slot for plugin |
126 |
|
$this->pointers[$name][...][...] = |
127 |
|
$this->stacks[$name][...][...] = |
128 |
|
} |
129 |
|
*/ |
130 |
|
|
131 |
} |
} |
132 |
|
|
133 |
?> |
?> |