git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for issue #33: excessive usage of numeric charset entities when converting utf8...
[plcapi.git]
/
src
/
Wrapper.php
diff --git
a/src/Wrapper.php
b/src/Wrapper.php
index
f7f2072
..
8ea8f2d
100644
(file)
--- a/
src/Wrapper.php
+++ b/
src/Wrapper.php
@@
-8,8
+8,7
@@
namespace PhpXmlRpc;
/**
namespace PhpXmlRpc;
/**
- * PHP-XMLRPC "wrapper" class.
- * Generate stubs to transparently access xmlrpc methods as php functions and vice-versa.
+ * PHP-XMLRPC "wrapper" class - generate stubs to transparently access xmlrpc methods as php functions and vice-versa.
* Note: this class implements the PROXY pattern, but it is not named so to avoid confusion with http proxies.
*
* @todo use some better templating system for code generation?
* Note: this class implements the PROXY pattern, but it is not named so to avoid confusion with http proxies.
*
* @todo use some better templating system for code generation?
@@
-175,8
+174,7
@@
class Wrapper
$plainFuncName = 'Closure';
$exists = true;
$plainFuncName = 'Closure';
$exists = true;
- }
- else {
+ } else {
$plainFuncName = $callable;
$exists = function_exists($callable);
}
$plainFuncName = $callable;
$exists = function_exists($callable);
}
@@
-397,7
+395,7
@@
class Wrapper
* @param array $extraOptions
* @param string $plainFuncName
* @param string $funcDesc
* @param array $extraOptions
* @param string $plainFuncName
* @param string $funcDesc
- * @return
callabl
e
+ * @return
\Closur
e
*/
protected function buildWrapFunctionClosure($callable, $extraOptions, $plainFuncName, $funcDesc)
{
*/
protected function buildWrapFunctionClosure($callable, $extraOptions, $plainFuncName, $funcDesc)
{
@@
-498,7
+496,7
@@
class Wrapper
* @param array $extraOptions
* @param string $plainFuncName
* @param array $funcDesc
* @param array $extraOptions
* @param string $plainFuncName
* @param array $funcDesc
- * @return
array
+ * @return
string
*
* @todo add a nice phpdoc block in the generated source
*/
*
* @todo add a nice phpdoc block in the generated source
*/
@@
-786,7
+784,7
@@
class Wrapper
* @param string $methodName
* @param array $extraOptions
* @param string $mSig
* @param string $methodName
* @param array $extraOptions
* @param string $mSig
- * @return
callabl
e
+ * @return
\Closur
e
*
* @todo should we allow usage of parameter simple_client_copy to mean 'do not clone' in this case?
*/
*
* @todo should we allow usage of parameter simple_client_copy to mean 'do not clone' in this case?
*/
@@
-822,7
+820,7
@@
class Wrapper
$decodeOptions[] = 'decode_php_objs';
}
$decodeOptions[] = 'decode_php_objs';
}
- /// @todo check for insufficient nr. of args besides excess ones
+ /// @todo check for insufficient nr. of args besides excess ones
? note that 'source' version does not...
// support one extra parameter: debug
$maxArgs = count($mSig)-1; // 1st element is the return type
// support one extra parameter: debug
$maxArgs = count($mSig)-1; // 1st element is the return type
@@
-835,7
+833,6
@@
class Wrapper
$xmlrpcArgs = array();
foreach($currentArgs as $i => $arg) {
if ($i == $maxArgs) {
$xmlrpcArgs = array();
foreach($currentArgs as $i => $arg) {
if ($i == $maxArgs) {
- /// @todo log warning? check what happens with the 'source' version
break;
}
$pType = $mSig[$i+1];
break;
}
$pType = $mSig[$i+1];
@@
-882,7
+879,7
@@
class Wrapper
* @param string $mDesc
* @return array
*/
* @param string $mDesc
* @return array
*/
- p
rotected
function buildWrapMethodSource($client, $methodName, array $extraOptions, $newFuncName, $mSig, $mDesc='')
+ p
ublic
function buildWrapMethodSource($client, $methodName, array $extraOptions, $newFuncName, $mSig, $mDesc='')
{
$timeout = isset($extraOptions['timeout']) ? (int)$extraOptions['timeout'] : 0;
$protocol = isset($extraOptions['protocol']) ? $extraOptions['protocol'] : '';
{
$timeout = isset($extraOptions['timeout']) ? (int)$extraOptions['timeout'] : 0;
$protocol = isset($extraOptions['protocol']) ? $extraOptions['protocol'] : '';