{
$result = $this->getResult();
$retval['classname'] = get_class($obj);
- $retval['description'] = (is_array($obj->getDescription()) ? implode("\n", $obj->getDescription()) : $obj->getDescription());
+ $retval['description'] = implode("\n", (array)$obj->getDescription());
+ $retval['version'] = implode("\n", (array)$obj->getVersion());
$retval['prefix'] = $obj->getModulePrefix();
if($obj->isReadMode())
$retval['readrights'] = '';
$retval['writerights'] = '';
if($obj->mustBePosted())
$retval['mustbeposted'] = '';
+ if($obj instanceof ApiQueryGeneratorBase)
+ $retval['generator'] = '';
$allowedParams = $obj->getFinalParams();
if(!is_array($allowedParams))
return $retval;
foreach($allowedParams as $n => $p)
{
$a = array('name' => $n);
+ if(isset($paramDesc[$n]))
+ $a['description'] = implode("\n", (array)$paramDesc[$n]);
+ if(isset($p[ApiBase::PARAM_DEPRECATED]) && $p[ApiBase::PARAM_DEPRECATED])
+ $a['deprecated'] = '';
if(!is_array($p))
{
if(is_bool($p))
$a['type'] = 'bool';
$a['default'] = ($p ? 'true' : 'false');
}
- if(is_string($p))
- $a['default'] = $p;
+ else if(is_string($p) || is_null($p))
+ {
+ $a['type'] = 'string';
+ $a['default'] = strval($p);
+ }
+ else if(is_int($p))
+ {
+ $a['type'] = 'integer';
+ $a['default'] = intval($p);
+ }
$retval['parameters'][] = $a;
continue;
}
$a['highmax'] = $p[ApiBase::PARAM_MAX2];
if(isset($p[ApiBase::PARAM_MIN]))
$a['min'] = $p[ApiBase::PARAM_MIN];
- if(isset($paramDesc[$n]))
- $a['description'] = (is_array($paramDesc[$n]) ? implode("\n", $paramDesc[$n]) : $paramDesc[$n]);
$retval['parameters'][] = $a;
}
$result->setIndexedTagName($retval['parameters'], 'param');