1 |
<?php |
2 |
/* |
3 |
|
4 |
YakkaArguments |
5 |
|
6 |
Handles all CGI arguments requested by the passed argument mapping table. |
7 |
|
8 |
TODO:DESCRIPTION |
9 |
*/ |
10 |
|
11 |
require_once("YakkaObject.php"); |
12 |
|
13 |
class YakkaArguments extends YakkaObject { |
14 |
var $argumentNames; |
15 |
var $allArguments; |
16 |
|
17 |
function YakkaArguments($argumentNames) { |
18 |
$this->YakkaObject("YakkaArguments"); |
19 |
$this->argumentNames = $argumentNames; |
20 |
|
21 |
global $HTTP_GET_VARS; |
22 |
global $HTTP_POST_VARS; |
23 |
|
24 |
set_magic_quotes_runtime(0); |
25 |
if (get_magic_quotes_gpc()) { |
26 |
$this->stripMagicQuotes($HTTP_GET_VARS); |
27 |
$this->stripMagicQuotes($HTTP_POST_VARS); |
28 |
} |
29 |
|
30 |
$this->allArguments = $HTTP_POST_VARS + $HTTP_GET_VARS; |
31 |
} |
32 |
|
33 |
function stripMagicQuotes(&$variables) { |
34 |
if (is_array($variables)) { |
35 |
foreach ($variables as $variable => $value) { |
36 |
if (is_array($value)) |
37 |
$this->StripMagicQuotes($variables[$variable]); |
38 |
else |
39 |
$variables[$variable] = stripslashes($value); |
40 |
} |
41 |
} |
42 |
} |
43 |
|
44 |
function getArgumentName($argumentName) { |
45 |
return $this->argumentNames[$argumentName]; |
46 |
} |
47 |
|
48 |
function getArgument($argumentName) { |
49 |
return $this->allArguments[$this->argumentNames[$argumentName]]; |
50 |
} |
51 |
|
52 |
function toXml() { |
53 |
} |
54 |
|
55 |
function fromXml($source) { |
56 |
} |
57 |
} |
58 |
|
59 |
?> |