| 3 | 
 //  $Id$ | 
 //  $Id$ | 
| 4 | 
 // --------------------------------------------------------------------------- | 
 // --------------------------------------------------------------------------- | 
| 5 | 
 //  $Log$ | 
 //  $Log$ | 
| 6 | 
  | 
 //  Revision 1.5  2003/03/03 21:11:01  joko | 
| 7 | 
  | 
 //  mungled the namespaces | 
| 8 | 
  | 
 // | 
| 9 | 
  | 
 //  Revision 1.4  2003/02/09 17:03:35  joko | 
| 10 | 
  | 
 //  + additional get-/setter methods | 
| 11 | 
  | 
 // | 
| 12 | 
 //  Revision 1.3  2003/02/03 14:41:21  joko | 
 //  Revision 1.3  2003/02/03 14:41:21  joko | 
| 13 | 
 //  + get- and set-methods to access configuration variables | 
 //  + get- and set-methods to access configuration variables | 
| 14 | 
 //  + recursive merging mechanism | 
 //  + recursive merging mechanism | 
| 51 | 
    | 
    | 
| 52 | 
   function merge() { | 
   function merge() { | 
| 53 | 
     //$this->_store[run] = array_merge($this->_store['default'], $this->_store['init']); | 
     //$this->_store[run] = array_merge($this->_store['default'], $this->_store['init']); | 
| 54 | 
  | 
 //print Dumper($this); | 
| 55 | 
     foreach ($this->_store[_init][configkeys] as $configKey) { | 
     foreach ($this->_store[_init][configkeys] as $configKey) { | 
| 56 | 
       //$this->_store[runtime] = array_merge($this->_store[runtime], $this->_store[$configKey]); | 
       //$this->_store[runtime] = array_merge($this->_store[runtime], $this->_store[$configKey]); | 
| 57 | 
       //$this->_store[runtime] = array_merge_recursive($this->_store[runtime], $this->_store[$configKey]); | 
       //$this->_store[runtime] = array_merge_recursive($this->_store[runtime], $this->_store[$configKey]); | 
| 58 | 
       $this->_store[runtime] = array_join_merge($this->_store[runtime], $this->_store[$configKey]); | 
       $this->_store[runtime] = php::array_join_merge($this->_store[runtime], $this->_store[$configKey]); | 
| 59 | 
     } | 
     } | 
| 60 | 
     //print Dumper($this); | 
     //print Dumper($this); | 
| 61 | 
   } | 
   } | 
| 62 | 
    | 
    | 
| 63 | 
   function getPart($var = null) { | 
   function get($var = null) { | 
| 64 | 
     //$this->merge(); | 
     //$this->merge(); | 
| 65 | 
     if ($var) { | 
     if ($var) { | 
| 66 | 
       return $this->getVar("runtime.$var"); | 
       return $this->get_absolute("runtime.$var"); | 
| 67 | 
     } else { | 
     } else { | 
| 68 | 
       return $this->getVar("runtime"); | 
       return $this->get_absolute("runtime"); | 
| 69 | 
     } | 
     } | 
| 70 | 
   } | 
   } | 
| 71 | 
    | 
    | 
| 72 | 
   function setVar($var, $val) { | 
   function set_absolute($var, $val) { | 
| 73 | 
     //$this->_store[runtime][$var] = $val; | 
     //$this->_store[runtime][$var] = $val; | 
| 74 | 
     //$deep = new Data_Deep($this->_store[runtime]); | 
     //$deep = new Data_Deep($this->_store[runtime]); | 
| 75 | 
     $deep = new Data_Deep($this->_store); | 
     $deep = new Data_Deep($this->_store); | 
| 76 | 
     $deep->set($var, $val); | 
     $deep->set($var, $val); | 
| 77 | 
   } | 
   } | 
| 78 | 
    | 
    | 
| 79 | 
   function getVar($var) { | 
   function get_absolute($var) { | 
| 80 | 
     //$this->_store[runtime][$var] = $val; | 
     //$this->_store[runtime][$var] = $val; | 
| 81 | 
     //$deep = new Data_Deep($this->_store[runtime]); | 
     //$deep = new Data_Deep($this->_store[runtime]); | 
| 82 | 
     $deep = new Data_Deep($this->_store); | 
     $deep = new Data_Deep($this->_store); |