3 |
// $Id$ |
// $Id$ |
4 |
// --------------------------------------------------------------------------- |
// --------------------------------------------------------------------------- |
5 |
// $Log$ |
// $Log$ |
6 |
|
// Revision 1.3 2003/02/09 17:05:15 joko |
7 |
|
// + minor update related to new log level constants |
8 |
|
// + restructured get-/setter methods |
9 |
|
// |
10 |
// Revision 1.2 2003/02/03 14:42:28 joko |
// Revision 1.2 2003/02/03 14:42:28 joko |
11 |
// + logging (LOG_DEBUG) |
// + added logging |
12 |
// + methods for accessing configuration variables |
// + methods for accessing configuration variables |
13 |
// |
// |
14 |
// Revision 1.1 2003/02/03 05:00:01 joko |
// Revision 1.1 2003/02/03 05:00:01 joko |
65 |
|
|
66 |
parent::constructor(); |
parent::constructor(); |
67 |
|
|
68 |
$this->log(get_class($this) . "->run: begin", LOG_INFO); |
$this->log("-----------------------------------------------------------------", PEAR_LOG_INFO); |
69 |
|
$this->log(get_class($this) . "->run: begin", PEAR_LOG_INFO); |
70 |
|
|
71 |
$cfg = $this->getConfig(); |
$cfg = $this->getConfig(); |
72 |
|
|
89 |
// run procedural functions |
// run procedural functions |
90 |
if (is_array($container[methods])) { |
if (is_array($container[methods])) { |
91 |
foreach ($container[methods] as $method) { |
foreach ($container[methods] as $method) { |
92 |
$this->log(get_class($this) . "->run: calling function in global namespace: '$method'", LOG_DEBUG); |
$this->log(get_class($this) . "->run: calling function in global namespace: '$method'", PEAR_LOG_DEBUG); |
93 |
call_user_func($method); |
call_user_func($method); |
94 |
} |
} |
95 |
} |
} |
96 |
|
|
97 |
} |
} |
98 |
|
|
99 |
$this->log(get_class($this) . "->run: end", LOG_INFO); |
$this->log(get_class($this) . "->run: end", PEAR_LOG_INFO); |
100 |
|
|
101 |
} |
} |
102 |
|
|
103 |
function getConfig($var = null) { |
function getConfig($var = null) { |
104 |
return $this->_config->getPart($var); |
return $this->_config->get($var); |
105 |
} |
} |
106 |
|
|
107 |
function _require_once_isolated($file) { |
function _require_once_isolated($file) { |
108 |
$this->log(get_class($this) . "->_require_once_isolated: $file", LOG_DEBUG); |
$this->log(get_class($this) . "->_require_once_isolated: $file", PEAR_LOG_DEBUG); |
109 |
if (require_once($file)) { |
if (require_once($file)) { |
110 |
return 1; |
return 1; |
111 |
} |
} |
113 |
|
|
114 |
function setConfigVar($var, $val) { |
function setConfigVar($var, $val) { |
115 |
//print "$var=$val<br>"; |
//print "$var=$val<br>"; |
116 |
$this->_config->setVar($var, $val); |
$this->_config->set_absolute($var, $val); |
117 |
} |
} |
118 |
|
|
119 |
function getConfigVar($var) { |
function getConfigVar($var) { |
120 |
return $this->_config->getVar($var); |
return $this->_config->get_absolute($var); |
121 |
} |
} |
122 |
|
|
123 |
} |
} |