1.2.443. Extensions yar¶
yar : Yet Another RPC framework.
<?php
/* assume this page can be accessed by http://example.com/operator.php */
class Operator {
/**
* Add two operands
* @param interge
* @return interge
*/
public function add($a, $b) {
return $this->_add($a, $b);
}
/**
* Sub
*/
public function sub($a, $b) {
return $a - $b;
}
/**
* Mul
*/
public function mul($a, $b) {
return $a * $b;
}
/**
* Protected methods will not be exposed
* @param interge
* @return interge
*/
protected function _add($a, $b) {
return $a + $b;
}
}
$server = new Yar_Server(new Operator());
$server->handle();
?>
See also yar.
1.2.443.1. Connex PHP features¶
1.2.443.1.1. Specs¶
Short name |
Extensions/Extyar |
Rulesets |
|
Exakat since |
2.4.1 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
Very high |
Available in |