diff options
author | knut <> | 2006-07-07 06:39:22 +0000 |
---|---|---|
committer | knut <> | 2006-07-07 06:39:22 +0000 |
commit | 7b84938b1b5964f2274d66e28ba17435924ffe35 (patch) | |
tree | ac3af1ce6d73372099d4cf7e5c447b8af6860447 | |
parent | 97dddf3cf23f7d2829d23efb9d44b746ac7d52cc (diff) |
Minor correction to the Soap demo
-rw-r--r-- | .gitattributes | 1 | ||||
-rw-r--r-- | demos/soap/protected/runtime/global.cache | 1 | ||||
-rw-r--r-- | demos/soap/protected/webservices/SimpleService.php | 61 |
3 files changed, 0 insertions, 63 deletions
diff --git a/.gitattributes b/.gitattributes index 10012892..a309ea01 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1001,7 +1001,6 @@ demos/soap/index.php -text demos/soap/protected/application.xml -text demos/soap/protected/pages/Home.page -text demos/soap/protected/pages/Home.php -text -demos/soap/protected/runtime/global.cache -text demos/soap/protected/webservices/SimpleService.php -text demos/sqlmap-sample/index.php -text demos/sqlmap-sample/protected/application.xml -text diff --git a/demos/soap/protected/runtime/global.cache b/demos/soap/protected/runtime/global.cache deleted file mode 100644 index 0520dc3a..00000000 --- a/demos/soap/protected/runtime/global.cache +++ /dev/null @@ -1 +0,0 @@ -a:1:{s:35:"prado:securitymanager:validationkey";s:38:"16373386985182982755332313631333778405";}
\ No newline at end of file diff --git a/demos/soap/protected/webservices/SimpleService.php b/demos/soap/protected/webservices/SimpleService.php index e59546bb..9aecbfad 100644 --- a/demos/soap/protected/webservices/SimpleService.php +++ b/demos/soap/protected/webservices/SimpleService.php @@ -15,31 +15,6 @@ class SimpleService } /** - * Given a left side, operation, and right side of an operation, will - * return the result of computing the equation. - * @param string $leftSide The left side of an equation - * @param string $operation The operation to perform - * @param string $rightSide The right side of the equation - * @return ComputationResult The result of the computation - * @soapmethod - */ - public function compute($leftSide, $operation, $rightSide) - { - $result = new ComputationResult(); - $result->equation = "$leftSide $operation $rightSide"; - $result->result = $this->evaluateExpression($leftSide, $operation, $rightSide); - if (count($this->errors)) { - $result->success = false; - $result->errors = $this->errors; - } - else { - $result->success = true; - } - - return $result; - } - - /** * Simply add two operands * @param int $a * @param int $b @@ -49,41 +24,5 @@ class SimpleService public function add($a, $b) { return $a + $b; } - - /** - * This method evaluates the expression. It should be capable of handling any $op - * passed to it. - * @return string the result of the evaluation - */ - private function evaluateExpression($left, $op, $right) - { - // Now, because we don't want to eval random code on the server that this is running - // on, we're just going to highlight the string - $evaluation = highlight_string("$left $op $right;", true); - return $evaluation; - } -} - -class ComputationResult -{ - /** - * @var string The initial equation - */ - public $equation; - - /** - * @var string The computed result - */ - public $result; - - /** - * @var boolean Whether the computation succeeded - */ - public $success; - - /** - * @var array any errors that occured in the processing. - */ - public $errors; } ?>
\ No newline at end of file |