diff options
Diffstat (limited to 'tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator')
9 files changed, 0 insertions, 363 deletions
diff --git a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Calculator.componentType b/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Calculator.componentType deleted file mode 100644 index 5a6c3a199e..0000000000 --- a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Calculator.componentType +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> - -<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"> - - <service name="CalculatorService"> - <interface.php/> - </service> - - <reference name="div_service"> - <interface.php/> - </reference> - -</componentType> diff --git a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Calculator.php b/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Calculator.php deleted file mode 100644 index f0f35bab56..0000000000 --- a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Calculator.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -# 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. -# -# -include 'SCA/SCA.php'; - -/** - * @service - * @binding.ws - */ -class Calculator { - - - /** - * @reference - * @binding.php Multiply.php - */ - public $mul_service; - - /** - * @reference - * @binding.tuscany div_service - */ - public $div_service; - - /** - * Addition - * - * @param float $num1 (the first number) - * @param float $num2 (the second number) - * @return float The result - */ - function add($num1, $num2) { - printf("in Calculator::add"); - return $num1 + $num2; -// return $this->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/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Divide.componentType b/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Divide.componentType deleted file mode 100644 index b50b20d9c6..0000000000 --- a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Divide.componentType +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> - -<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <service name="DivideService"> - <interface.php/> - </service> - - <reference name="log_service"> - <interface.php/> - </reference> -</componentType> diff --git a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Divide.php b/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Divide.php deleted file mode 100644 index 5a08e5b063..0000000000 --- a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Divide.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php -# 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. -# -# - -/** - * @service - * @binding.php - */ -class Divide { - - /** - * Division - * - * @param float $num1 (the first number) - * @param float $num2 (the second number) - * @return float The result - */ - function div($num1, $num2) { - - $result = $num1 / $num2; - - $log_proxy = SCA::getService("log_service"); - $log_proxy->log_message($result); - - return $result; - - } - -} - -?> diff --git a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Log.componentType b/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Log.componentType deleted file mode 100644 index f945c6af8c..0000000000 --- a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Log.componentType +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> - -<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <service name="LogService"> - <interface.php/> - </service> -</componentType> diff --git a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Log.php b/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Log.php deleted file mode 100644 index 0a955f36d3..0000000000 --- a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Log.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -# 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. -# -# - -/** - * @service - */ -class Log { - - /** - * Log - * - * @param string $message (the message to be logged) - */ - function log_message($message) { - SCA::$logger->toLog('>>> ' . $message); - } -} - -?> diff --git a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Makefile.am b/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Makefile.am deleted file mode 100644 index 10020c4f03..0000000000 --- a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -# 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/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Multiply.php b/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Multiply.php deleted file mode 100644 index ed2e75edc8..0000000000 --- a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/Multiply.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -# 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. -# -# -require 'SCA/SCA.php'; - -class Multiply { - - /** - * @reference - * @binding.php Log.php - */ - public $log_service; - - function mul($num1, $num2) { - $result = $num1 * $num2; - -// $this->log_service->log_message($result); - - return $result; - } -} - -?> diff --git a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/sample.calculator.composite b/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/sample.calculator.composite deleted file mode 100644 index f1a82a70db..0000000000 --- a/tags/native-sca-1.0.incubating-M3/runtime/extensions/php/samples/PHPCalculator/sample.calculator/sample.calculator.composite +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> - -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - name="sample.calculator"> - - <component name="CalculatorComponent"> - <implementation.php module="Calculator" class="Calculator" scope="composite"/> - <reference name="div_service">DivideComponent</reference> - </component> - - - <component name="DivideComponent"> - <implementation.php module="Divide" class="Divide" scope="composite"/> - <reference name="log_service">LogComponent</reference> - </component> - - <component name="LogComponent"> - <implementation.php module="Log" class="Log" scope="composite"/> - </component> - - - - - -</composite> - |