From be18f7219ae362ac325821dd995fc629ebf1cb71 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Fri, 17 Sep 2010 14:49:18 +0000 Subject: [PATCH] =?UTF-8?q?Modification=20du=20controller=20pour=20affiche?= =?UTF-8?q?r=20la=20documentation=20du=20service=20et=20impl=C3=A9mentatio?= =?UTF-8?q?n=20dans=20les=20templates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/IndexController.php | 26 ++++++++++++++++++++- application/views/scripts/index/index.phtml | 15 ++++++++++++ application/views/scripts/main.phtml | 2 +- 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php index bcb40dc5..835f620b 100644 --- a/application/controllers/IndexController.php +++ b/application/controllers/IndexController.php @@ -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); } - } diff --git a/application/views/scripts/index/index.phtml b/application/views/scripts/index/index.phtml index e69de29b..41edabef 100644 --- a/application/views/scripts/index/index.phtml +++ b/application/views/scripts/index/index.phtml @@ -0,0 +1,15 @@ +serviceMethods as $method) {?> +
+

docMethod($method)?>

+

+ Description : docDescription($method)?> +
+
+ Paramètres : docParameter($method['params'], $this->serviceTypes)?> +
+
+ Retour : docReturn($method['return'], $this->serviceTypes)?> +
+
+
+ diff --git a/application/views/scripts/main.phtml b/application/views/scripts/main.phtml index d585e63d..5b35c33b 100644 --- a/application/views/scripts/main.phtml +++ b/application/views/scripts/main.phtml @@ -1,5 +1,5 @@ doctype() ?> - + headMeta() ?> headTitle() ?>