Service Browser does not handle method table ‘arguments’ metadata defined as key value pairs.

While defining the method table for my ObjectStore service I noticed it. Those who use the JavaDoc style comments to generate the method table may never notice this issue.

Arguments metadata can be defined as an array of strings (as created by javadoc comments) or array of array which contains argument name as the key and settings as the value. More on this at

ServiceBroswer class always expects the arguments data as numeric index based array. If you supply key value pair it renders it as ‘Array’ instead of the actual argument name. Also it does not remember the arguments submitted last time.
Following picture shows the issue

I did the following modifications to ‘_printMethod’ function in ServiceBrowser.php under the ‘amfphp/browser’ folder to make it work 🙂

$keyIndex = 0;
    foreach($arguments as $key => $name) {
                $name = $key;
                $key = $keyIndex ++;
            $method .= '<tr><td>' . $name . '</td><td><input type="text" name="' . $methodName . '_arguments[]" maxlength="65535" value="'. htmlspecialchars(strip($_POST[$methodName . "_arguments"][$key])) . '"/></td></tr>'."n";

Leave a Reply