Affichage de la description retour

This commit is contained in:
Michael RICOIS 2017-03-09 16:26:22 +01:00
parent c1b1686296
commit 97055a0419
2 changed files with 28 additions and 25 deletions

View File

@ -29,7 +29,7 @@
<b><?php echo $method['name'];?></b>
<a href="#<?php echo $method['name'];?>"><i>Détail</i></a>
</li>
<?php } ?>
<?php }?>
</ol>
</div>
</div>
@ -60,6 +60,7 @@
<h5>Retour</h5>
<div class="bs-callout bs-callout-php">
<?php if ($method['returnDesc'] != '') {?><?=$method['returnDesc']?><br/><br/><?php }?>
<?=$this->docReturn($method['return'], $this->serviceTypes);?>
</div>

View File

@ -39,8 +39,7 @@ class Scores_Ws_Doc
private function parseService()
{
$class = new Zend_Server_Reflection();
$methods = $class->reflectClass($this->serviceClass)
->getMethods();
$methods = $class->reflectClass($this->serviceClass)->getMethods();
$methodsElement = array();
foreach ($methods as $method) {
$prototype = null;
@ -68,11 +67,14 @@ class Scores_Ws_Doc
$paramsElement[] = $paramElement;
}
$return = $prototype->getReturnValue();
$methodElement = array(
'name' => $method->getName(),
'desc' => $method->getDescription(),
'params' => $paramsElement,
'return' => $prototype->getReturnType(),
'returnDesc' => $return->getDescription(),
);
$methodsElement[] = $methodElement;