X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2FWrapper.php;h=10aae52eaf6d4842bd6fb433938f597e30e33dd4;hb=cc67a43993662a5a3f92801b96b89ee6e3998532;hp=21321a64ca197c238025aa56f6e762aa38381ad9;hpb=5481456fe553efa3dbdb90c3c05799637b595737;p=plcapi.git diff --git a/src/Wrapper.php b/src/Wrapper.php index 21321a6..10aae52 100644 --- a/src/Wrapper.php +++ b/src/Wrapper.php @@ -280,10 +280,10 @@ class Wrapper $desc .= $doc; } elseif (strpos($doc, '@param') === 0) { // syntax: @param type $name [desc] - if (preg_match('/@param\s+(\S+)\s+(\$\S+)\s+(.+)?/', $doc, $matches)) { + if (preg_match('/@param\s+(\S+)\s+(\$\S+)\s*(.+)?/', $doc, $matches)) { $name = strtolower(trim($matches[2])); //$paramDocs[$name]['name'] = trim($matches[2]); - $paramDocs[$name]['doc'] = $matches[3]; + $paramDocs[$name]['doc'] = isset($matches[3]) ? $matches[3] : ''; $paramDocs[$name]['type'] = $matches[1]; } $i++; @@ -822,7 +822,7 @@ class Wrapper $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 @@ -835,7 +835,6 @@ class Wrapper $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]; @@ -882,7 +881,7 @@ class Wrapper * @param string $mDesc * @return array */ - protected function buildWrapMethodSource($client, $methodName, array $extraOptions, $newFuncName, $mSig, $mDesc='') + public function buildWrapMethodSource($client, $methodName, array $extraOptions, $newFuncName, $mSig, $mDesc='') { $timeout = isset($extraOptions['timeout']) ? (int)$extraOptions['timeout'] : 0; $protocol = isset($extraOptions['protocol']) ? $extraOptions['protocol'] : '';