3 |
// $Id$ |
// $Id$ |
4 |
// ------------------------------------------------------------------------- |
// ------------------------------------------------------------------------- |
5 |
// $Log$ |
// $Log$ |
6 |
|
// Revision 1.2 2003/02/09 17:02:30 joko |
7 |
|
// + minor update related to new log level constants |
8 |
|
// |
9 |
// Revision 1.1 2003/02/04 08:24:37 joko |
// Revision 1.1 2003/02/04 08:24:37 joko |
10 |
// + initial commit |
// + initial commit |
11 |
// + refactored from flib/Site/Request.php and flib/Site/Handler.php |
// + refactored from flib/Site/Request.php and flib/Site/Handler.php |
47 |
|
|
48 |
function getRequest() { |
function getRequest() { |
49 |
$parent = $this->parent; |
$parent = $this->parent; |
50 |
$this->$parent->log( get_class($this) . "->getRequest()", LOG_DEBUG ); |
$this->$parent->log( get_class($this) . "->getRequest()", PEAR_LOG_DEBUG ); |
51 |
$this->_init(); |
$this->_init(); |
52 |
|
//print Dumper($this->request); |
53 |
|
//exit; |
54 |
return $this->request; |
return $this->request; |
55 |
} |
} |
56 |
|
|
66 |
|
|
67 |
function _read() { |
function _read() { |
68 |
|
|
69 |
|
$this->meta[read] = 1; |
70 |
|
|
71 |
$parent = $this->parent; |
$parent = $this->parent; |
72 |
|
|
73 |
|
$this->$parent->log( get_class($this) . "->_read begin", PEAR_LOG_DEBUG ); |
74 |
|
|
75 |
// shift external arguments from url |
// shift external arguments from url |
76 |
$identifier = $_GET[x]; |
$identifier = $_GET[x]; |
77 |
$externalpage = $_GET[p]; |
$externalpage = $_GET[p]; |
78 |
// fallback to post |
// fallback to post |
79 |
if (!$identifier) { $identifier = $_POST[x]; } |
if (!$identifier) { $identifier = $_POST[x]; } |
80 |
|
|
81 |
$this->$parent->log( get_class($this) . "->_read( identifier $identifier )", LOG_DEBUG ); |
$this->$parent->log( get_class($this) . "->_read( identifier $identifier )", PEAR_LOG_DEBUG ); |
82 |
|
|
83 |
// remember raw arguments in object |
// remember raw arguments in object |
84 |
$this->raw[identifier] = $identifier; |
$this->raw[identifier] = $identifier; |
85 |
$this->raw[externalpage] = $externalpage; |
$this->raw[externalpage] = $externalpage; |
86 |
// TODO: url |
// TODO: url |
87 |
|
|
|
$this->meta[read] = 1; |
|
|
|
|
88 |
} |
} |
89 |
|
|
90 |
|
|
91 |
function _parse() { |
function _parse() { |
92 |
|
|
93 |
|
$this->meta[parse] = 1; |
94 |
|
|
95 |
$parent = $this->parent; |
$parent = $this->parent; |
96 |
|
|
97 |
|
$this->$parent->log( get_class($this) . "->_parse begin", PEAR_LOG_DEBUG ); |
98 |
|
|
99 |
// generic identifier |
// generic identifier |
100 |
$ident = $this->$parent->decodeIdentifier($this->raw[identifier]); |
$ident = $this->$parent->decodeIdentifier($this->raw[identifier]); |
101 |
|
|
102 |
// get handler for identifier |
// get handler for identifier |
103 |
$this->$parent->log( get_class($this) . "->_parse: getHandler( identifier $ident )", LOG_DEBUG ); |
$this->$parent->log( get_class($this) . "->_parse: getHandler( identifier $ident )", PEAR_LOG_DEBUG ); |
104 |
//$handler = $this->getHandler($ident); |
//$handler = $this->getHandler($ident); |
105 |
$handler = $this->$parent->getHandler($ident); |
$handler = $this->$parent->getHandler($ident); |
106 |
|
|
125 |
|
|
126 |
$this->request = $result; |
$this->request = $result; |
127 |
|
|
|
$this->meta[parse] = 1; |
|
|
|
|
128 |
} |
} |
129 |
|
|
130 |
function getCached() { |
function getCached() { |