From bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a Mon Sep 17 00:00:00 2001 From: dims Date: Tue, 17 Jun 2008 00:23:01 +0000 Subject: Move Tuscany from Incubator to top level. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68 --- .../sample.calculator/Calculator.componentType | 31 ++++++++ .../PHPCalculator/sample.calculator/Calculator.php | 89 ++++++++++++++++++++++ .../sample.calculator/Divide.componentType | 29 +++++++ .../PHPCalculator/sample.calculator/Divide.php | 47 ++++++++++++ .../sample.calculator/Log.componentType | 25 ++++++ .../PHPCalculator/sample.calculator/Log.php | 36 +++++++++ .../PHPCalculator/sample.calculator/Makefile.am | 23 ++++++ .../PHPCalculator/sample.calculator/Multiply.php | 39 ++++++++++ .../sample.calculator/sample.calculator.composite | 44 +++++++++++ 9 files changed, 363 insertions(+) create mode 100644 tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Calculator.componentType create mode 100644 tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Calculator.php create mode 100644 tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Divide.componentType create mode 100644 tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Divide.php create mode 100644 tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Log.componentType create mode 100644 tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Log.php create mode 100644 tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Makefile.am create mode 100644 tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Multiply.php create mode 100644 tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/sample.calculator.composite (limited to 'tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator') diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Calculator.componentType b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Calculator.componentType new file mode 100644 index 0000000000..5a6c3a199e --- /dev/null +++ b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Calculator.componentType @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Calculator.php b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Calculator.php new file mode 100644 index 0000000000..f0f35bab56 --- /dev/null +++ b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Calculator.php @@ -0,0 +1,89 @@ +add_service->add($num1, $num2); + } + + /** + * Subtraction + * + * @param float $num1 (the first number) + * @param float $num2 (the second number) + * @return float The result + */ + function sub($num1, $num2) { + return $num1 - $num2; +// return $this->sub_service->sub($num1, $num2); + } + + /** + * Multiplication + * + * @param float $num1 (the first number) + * @param float $num2 (the second number) + * @return float The result + */ + function mul($num1, $num2) { + return $this->mul_service->mul($num1, $num2); + } + + /** + * Division + * + * @param float $num1 (the first number) + * @param float $num2 (the second number) + * @return float The result + */ + function div($num1, $num2) { + return $this->div_service->div($num1, $num2); + } +} + +?> diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Divide.componentType b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Divide.componentType new file mode 100644 index 0000000000..b50b20d9c6 --- /dev/null +++ b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Divide.componentType @@ -0,0 +1,29 @@ + + + + + + + + + + + + diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Divide.php b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Divide.php new file mode 100644 index 0000000000..5a08e5b063 --- /dev/null +++ b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Divide.php @@ -0,0 +1,47 @@ +log_message($result); + + return $result; + + } + +} + +?> diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Log.componentType b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Log.componentType new file mode 100644 index 0000000000..f945c6af8c --- /dev/null +++ b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Log.componentType @@ -0,0 +1,25 @@ + + + + + + + + diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Log.php b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Log.php new file mode 100644 index 0000000000..0a955f36d3 --- /dev/null +++ b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Log.php @@ -0,0 +1,36 @@ +toLog('>>> ' . $message); + } +} + +?> diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Makefile.am b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Makefile.am new file mode 100644 index 0000000000..10020c4f03 --- /dev/null +++ b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Makefile.am @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +deploydir=$(prefix)/samples/PHPCalculator/deploy +compositedir=$(deploydir)/sample.calculator + +composite_DATA = *.composite *.componentType *.php +EXTRA_DIST = *.composite *.componentType *.php + diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Multiply.php b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Multiply.php new file mode 100644 index 0000000000..ed2e75edc8 --- /dev/null +++ b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Multiply.php @@ -0,0 +1,39 @@ +log_service->log_message($result); + + return $result; + } +} + +?> diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/sample.calculator.composite b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/sample.calculator.composite new file mode 100644 index 0000000000..f1a82a70db --- /dev/null +++ b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/samples/PHPCalculator/sample.calculator/sample.calculator.composite @@ -0,0 +1,44 @@ + + + + + + + + DivideComponent + + + + + + LogComponent + + + + + + + + + + + + -- cgit v1.2.3