00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 class OptionCheck extends Check
00022 {
00027 var $options;
00028 var $values;
00029 var $expects;
00030
00035 function FunctionCheck()
00036 {
00037 }
00038
00044 function Action()
00045 {
00046 foreach ($this->options as $option)
00047 {
00048 $this->values[$option] = ini_get($option);
00049 }
00050
00051
00052 $this->status = STATUS_PASSED;
00053 foreach ($this->values as $key => $val)
00054 {
00055 if ($this->expects[$key] != $val)
00056 {
00057 if ($this->serious)
00058 {
00059 $this->status = STATUS_ERROR;
00060 }
00061 else
00062 {
00063 $this->status = STATUS_WARNING;
00064 }
00065 }
00066 }
00067 }
00068
00076 function Result()
00077 {
00078 $result = array();
00079 foreach ($this->options as $option)
00080 {
00081 $result[$option] = $this->values[$option] == $this->expects[$option];
00082 }
00083 return $result;
00084 }
00085 }
00086 ?>