/[cvs]/nfo/php/libs/org.netfrag.glib/Application/RequestTracker.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.glib/Application/RequestTracker.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by joko, Fri Feb 28 04:14:48 2003 UTC revision 1.2 by jonen, Sat Mar 1 15:17:26 2003 UTC
# Line 4  Line 4 
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  ##  ##
# Line 13  Line 19 
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() {
# Line 45  class Application_RequestTracker { Line 61  class 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    }    }
# Line 78  class Application_RequestTracker { Line 94  class Application_RequestTracker {
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  ?>  ?>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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