Modification du controller pour afficher la documentation du service et implémentation dans les templates
This commit is contained in:
parent
4c96305413
commit
be18f7219a
@ -17,9 +17,33 @@ class IndexController extends Zend_Controller_Action
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
require_once 'Web/WebClassDoc.php';
|
||||
|
||||
//Gestion des types de données
|
||||
$classmap = array(
|
||||
'IdentiteReturnType' => 'IdentiteReturnType',
|
||||
'IdentiteResultType' => 'IdentiteResultType',
|
||||
'GeoInfos' => 'GeoInfos',
|
||||
'IdentiteBilan' => 'IdentiteBilan',
|
||||
'IdentiteBourse' => 'IdentiteBourse',
|
||||
|
||||
'RechercheEntrepriseType' => 'RechercheEntrepriseType',
|
||||
'CriteresEntreprise' => 'CriteresEntreprise',
|
||||
'CriteresDirigeant' => 'CriteresDirigeant',
|
||||
'RechercheEntrepriseResult' => 'RechercheEntrepriseResult',
|
||||
'RechercheEntrepriseReponses' => 'RechercheEntrepriseReponses',
|
||||
|
||||
'ErrorType' => 'ErrorType',
|
||||
|
||||
'StatusResultType' => 'StatusResultType',
|
||||
);
|
||||
|
||||
$doc = new WebClassDoc('WsEntreprise', $classmap);
|
||||
$tabServiceMethods = $doc->getServiceMethods();
|
||||
$tabServiceTypes = $doc->getServiceTypes();
|
||||
$this->view->assign('serviceMethods', $tabServiceMethods);
|
||||
$this->view->assign('serviceTypes', $tabServiceTypes);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,15 @@
|
||||
<?php foreach ($this->serviceMethods as $method) {?>
|
||||
<div>
|
||||
<p><?=$this->docMethod($method)?><p>
|
||||
<div style="border:1px solid;">
|
||||
Description : <?=$this->docDescription($method)?>
|
||||
</div>
|
||||
<div style="border:1px solid;">
|
||||
Paramètres : <?=$this->docParameter($method['params'], $this->serviceTypes)?>
|
||||
</div>
|
||||
<div style="border:1px solid;">
|
||||
Retour : <?=$this->docReturn($method['return'], $this->serviceTypes)?>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<?php } ?>
|
@ -1,5 +1,5 @@
|
||||
<?= $this->doctype() ?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<head>
|
||||
<?= $this->headMeta() ?>
|
||||
<?= $this->headTitle() ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user