Subversion Repositories Applications.framework

Rev

Rev 300 | Blame | Last modification | View Log | RSS feed

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
                <head>
                        <!-- template designed by Marco Von Ballmoos  -->
                        <title>Docs For Class RestService</title>
                        <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
                        <link rel="stylesheet" href="../media/stylesheet.css" />
                                                <script src="../media/lib/classTree.js"></script>
                                                                                                <script language="javascript" type="text/javascript">
                                var imgPlus = new Image();
                                var imgMinus = new Image();
                                imgPlus.src = "../media/images/plus.png";
                                imgMinus.src = "../media/images/minus.png";
                                
                                function showNode(Node){
                                                        switch(navigator.family){
                                                                case 'nn4':
                                                                        // Nav 4.x code fork...
                                                        var oTable = document.layers["span" + Node];
                                                        var oImg = document.layers["img" + Node];
                                                                        break;
                                                                case 'ie4':
                                                                        // IE 4/5 code fork...
                                                        var oTable = document.all["span" + Node];
                                                        var oImg = document.all["img" + Node];
                                                                        break;
                                                                case 'gecko':
                                                                        // Standards Compliant code fork...
                                                        var oTable = document.getElementById("span" + Node);
                                                        var oImg = document.getElementById("img" + Node);
                                                                        break;
                                                        }
                                        oImg.src = imgMinus.src;
                                        oTable.style.display = "block";
                                }
                                
                                function hideNode(Node){
                                                        switch(navigator.family){
                                                                case 'nn4':
                                                                        // Nav 4.x code fork...
                                                        var oTable = document.layers["span" + Node];
                                                        var oImg = document.layers["img" + Node];
                                                                        break;
                                                                case 'ie4':
                                                                        // IE 4/5 code fork...
                                                        var oTable = document.all["span" + Node];
                                                        var oImg = document.all["img" + Node];
                                                                        break;
                                                                case 'gecko':
                                                                        // Standards Compliant code fork...
                                                        var oTable = document.getElementById("span" + Node);
                                                        var oImg = document.getElementById("img" + Node);
                                                                        break;
                                                        }
                                        oImg.src = imgPlus.src;
                                        oTable.style.display = "none";
                                }
                                
                                function nodeIsVisible(Node){
                                                        switch(navigator.family){
                                                                case 'nn4':
                                                                        // Nav 4.x code fork...
                                                        var oTable = document.layers["span" + Node];
                                                                        break;
                                                                case 'ie4':
                                                                        // IE 4/5 code fork...
                                                        var oTable = document.all["span" + Node];
                                                                        break;
                                                                case 'gecko':
                                                                        // Standards Compliant code fork...
                                                        var oTable = document.getElementById("span" + Node);
                                                                        break;
                                                        }
                                        return (oTable && oTable.style.display == "block");
                                }
                                
                                function toggleNodeVisibility(Node){
                                        if (nodeIsVisible(Node)){
                                                hideNode(Node);
                                        }else{
                                                showNode(Node);
                                        }
                                }
                        </script>
                                        </head>
                <body>
                        <div class="page-body">                 
<h2 class="class-name">Class RestService</h2>

<a name="sec-description"></a>
<div class="info-box">
        <div class="info-box-title">Description</div>
        <div class="nav-bar">
                                        <span class="disabled">Description</span> |
                                                                                                        <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
                                                |                                                                                       <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
                                                
                                        </div>
        <div class="info-box-body">
                        <!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Classe principale gérant les services.</p>
<p class="description"><p>Paramètres liés dans config.ini : <ul><li>serveur.baseURL</li></ul>  Encodage en entrée : utf8  Encodage en sortie : utf8</p></p>
        <ul class="tags">
                                <li><span class="field">author:</span> Jean-Pascal MILCENT &lt;<a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a>&gt;</li>
                                <li><span class="field">version:</span> $Id: RestService.php 299 2011-01-18 14:03:46Z jpm $</li>
                                <li><span class="field">copyright:</span> Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</li>
                                <li><span class="field">link:</span> /doc/framework/</li>
                                <li><span class="field">abstract:</span> </li>
                                <li><span class="field">since:</span> 0.3</li>
                                <li><span class="field">license:</span> GPL</li>
                                <li><span class="field">license:</span> CECILL</li>
                        </ul>
                <p class="notes">
                        Located in <a class="field" href="_RestService.php.html">/RestService.php</a> (line <span class="field"><a href="../__filesource/fsource_Framework__RestService.php.html#a20">20</a></span>)
                </p>
                
                                
                <pre></pre>
        
                        </div>
</div>



        <a name="sec-var-summary"></a>
        <div class="info-box">
                <div class="info-box-title">Variable Summary</span></div>
                <div class="nav-bar">
                        <a href="#sec-description">Description</a> |
                                                <span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
                                                        | 
                                                                        <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
                                                        
                                                                </div>
                <div class="info-box-body">
                        <div class="var-summary">
                                                                                                                                                                                                <div class="var-title">
                                        <span class="var-type">mixed</span>
                                        <a href="#$bdd" title="details" class="var-name">$bdd</a>
                                </div>
                                                                                        </div>
                </div>
        </div>

        <a name="sec-method-summary"></a>
        <div class="info-box">
                <div class="info-box-title">Method Summary</span></div>
                <div class="nav-bar">
                        <a href="#sec-description">Description</a> |
                                                                                                                                                <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
                                 
                                |
                                                <span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
                </div>
                <div class="info-box-body">                     
                        <div class="method-summary">
                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                <div class="method-definition">
                                                                                        <span class="method-result">RestService</span>
                                                                                <a href="#__construct" title="details" class="method-name">__construct</a>
                                                                                        (<span class="var-type"></span>&nbsp;<span class="var-name">$config</span>)
                                                                        </div>
                                                                                                                
                                <div class="method-definition">
                                                                                        <span class="method-result">string</span>
                                                                                <a href="#ajouter" title="details" class="method-name">ajouter</a>
                                                                                        (<span class="var-type">array</span>&nbsp;<span class="var-name">$ressources</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$requeteDonnees</span>)
                                                                        </div>
                                                                                                                
                                <div class="method-definition">
                                                                                        <span class="method-result">string</span>
                                                                                <a href="#consulter" title="details" class="method-name">consulter</a>
                                                                                        (<span class="var-type">array</span>&nbsp;<span class="var-name">$ressources</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$parametres</span>)
                                                                        </div>
                                                                                                                
                                <div class="method-definition">
                                                                                        <span class="method-result">mixed</span>
                                                                                <a href="#modifier" title="details" class="method-name">modifier</a>
                                                                                        (<span class="var-type">array</span>&nbsp;<span class="var-name">$ressources</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$requeteDonnees</span>)
                                                                        </div>
                                                                                                                
                                <div class="method-definition">
                                                                                        <span class="method-result">mixed</span>
                                                                                <a href="#supprimer" title="details" class="method-name">supprimer</a>
                                                                                        (<span class="var-type">array</span>&nbsp;<span class="var-name">$ressources</span>)
                                                                        </div>
                                                                                        </div>
                </div>
        </div>          

        <a name="sec-vars"></a>
        <div class="info-box">
                <div class="info-box-title">Variables</div>
                <div class="nav-bar">
                        <a href="#sec-description">Description</a> |
                                                                                <a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
                                                
                        
                                                                                | 
                                                                        <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
                                                        
                                        </div>
                <div class="info-box-body">
                        
<a name="var$bdd" id="$bdd"><!-- --></A>
<div class="evenrow">

        <div class="var-header">
                <span class="var-title">
                        <span class="var-type">mixed</span>
                        <span class="var-name">$bdd</span>
                                                (line <span class="line-number"><a href="../__filesource/fsource_Framework__RestService.php.html#a23">23</a></span>)
                </span>
        </div>

        <!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Objet de connection à la base de données.</p>
        <ul class="tags">
                                <li><span class="field">access:</span> protected</li>
                        </ul>
        
        
                
                

</div>
                                                
                </div>
        </div>
        
        <a name="sec-methods"></a>
        <div class="info-box">
                <div class="info-box-title">Methods</div>
                <div class="nav-bar">
                        <a href="#sec-description">Description</a> |
                                                                                                                        <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
                                                                                                                                        <a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
                                                
                </div>
                <div class="info-box-body">
                        <A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
        
        <div class="method-header">
                <span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__RestService.php.html#a25">25</a></span>)
        </div> 
        
        <!-- ========== Info from phpDoc block ========= -->
        <ul class="tags">
                                <li><span class="field">access:</span> public</li>
                        </ul>
        
        <div class="method-signature">
                <span class="method-result">RestService</span>
                <span class="method-name">
                        __construct
                </span>
                                        (<span class="var-type"></span>&nbsp;<span class="var-name">$config</span>)
                        </div>
        
                        <ul class="parameters">
                                        <li>
                                <span class="var-type"></span>
                                <span class="var-name">$config</span>                   </li>
                                </ul>
                
                        
        </div>
<a name="methodajouter" id="ajouter"><!-- --></a>
<div class="evenrow">
        
        <div class="method-header">
                <span class="method-title">ajouter</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__RestService.php.html#a73">73</a></span>)
        </div> 
        
        <!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Méthode appelée lors d'une requête HTTP de type PUT.</p>
<p class="description"><p>L'identifiant de la ressource à ajouter est indiqué via l'url si on le connait par avance. Sinon, il doit être créé par  le service. Dans ce dernier cas, le nouvel identifiant devrait être renvoyé dans le corps de la réponse.  Si l'ajout est un succès, le code statut HTTP retourné devrait être 201.</p></p>
        <ul class="tags">
                                <li><span class="field">return:</span> l'identifiant créé.</li>
                                <li><span class="field">access:</span> public</li>
                        </ul>
        
        <div class="method-signature">
                <span class="method-result">string</span>
                <span class="method-name">
                        ajouter
                </span>
                                        (<span class="var-type">array</span>&nbsp;<span class="var-name">$ressources</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$requeteDonnees</span>)
                        </div>
        
                        <ul class="parameters">
                                        <li>
                                <span class="var-type">array</span>
                                <span class="var-name">$ressources</span><span class="var-description">: Morceaux de l'url servant à préciser la ressource concerné pour le service demandé.</span>                 </li>
                                        <li>
                                <span class="var-type">array</span>
                                <span class="var-name">$requeteDonnees</span><span class="var-description">: les données transférées dans le corps de la requête devant servir à l'ajout.</span>                   </li>
                                </ul>
                
                        
        </div>
<a name="methodconsulter" id="consulter"><!-- --></a>
<div class="oddrow">
        
        <div class="method-header">
                <span class="method-title">consulter</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__RestService.php.html#a41">41</a></span>)
        </div> 
        
        <!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Méthode appelée lors d'une requête HTTP de type GET.</p>
<p class="description"><p>Si la consultation est un succès, le code statut HTTP retourné devrait être 200.</p></p>
        <ul class="tags">
                                <li><span class="field">return:</span> une chaine indiquant le succès de l'opération et les données demandées.</li>
                                <li><span class="field">access:</span> public</li>
                        </ul>
        
        <div class="method-signature">
                <span class="method-result">string</span>
                <span class="method-name">
                        consulter
                </span>
                                        (<span class="var-type">array</span>&nbsp;<span class="var-name">$ressources</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$parametres</span>)
                        </div>
        
                        <ul class="parameters">
                                        <li>
                                <span class="var-type">array</span>
                                <span class="var-name">$ressources</span><span class="var-description">: Morceaux de l'url servant à préciser la ressource concerné pour le service demandé.</span>                 </li>
                                        <li>
                                <span class="var-type">array</span>
                                <span class="var-name">$parametres</span><span class="var-description">: Partie de l'url situé après le '?' servant à paramétrer le service demandé.</span>                        </li>
                                </ul>
                
                        
        </div>
<a name="methodmodifier" id="modifier"><!-- --></a>
<div class="evenrow">
        
        <div class="method-header">
                <span class="method-title">modifier</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__RestService.php.html#a57">57</a></span>)
        </div> 
        
        <!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Méthode appelée lors d'une requête HTTP de type POST.</p>
<p class="description"><p>La ressource à modifier est indiquée via l'url. Les données devant servir à la mise à jours sont passées dans le corps  de la requête.  Si la modification est un succès, le code statut HTTP retourné devrait être 201.</p></p>
        <ul class="tags">
                                <li><span class="field">return:</span> une chaine indiquant le succès de l'opération ou rien.</li>
                                <li><span class="field">access:</span> public</li>
                        </ul>
        
        <div class="method-signature">
                <span class="method-result">mixed</span>
                <span class="method-name">
                        modifier
                </span>
                                        (<span class="var-type">array</span>&nbsp;<span class="var-name">$ressources</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$requeteDonnees</span>)
                        </div>
        
                        <ul class="parameters">
                                        <li>
                                <span class="var-type">array</span>
                                <span class="var-name">$ressources</span><span class="var-description">: Morceaux de l'url servant à préciser la ressource concerné pour le service demandé.</span>                 </li>
                                        <li>
                                <span class="var-type">array</span>
                                <span class="var-name">$requeteDonnees</span><span class="var-description">: les données transférées dans le corps de la requête devant servir à la modification.</span>                   </li>
                                </ul>
                
                        
        </div>
<a name="methodsupprimer" id="supprimer"><!-- --></a>
<div class="oddrow">
        
        <div class="method-header">
                <span class="method-title">supprimer</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__RestService.php.html#a86">86</a></span>)
        </div> 
        
        <!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Méthode appelée lors d'une requête HTTP de type DELETE (ou POST avec action=DELETE dans le corps de la requete).</p>
<p class="description"><p>Si la suppression est un succès, le code statut HTTP retourné devrait être 204.</p></p>
        <ul class="tags">
                                <li><span class="field">return:</span> une chaine indiquant le succès de l'opération ou rien.</li>
                                <li><span class="field">access:</span> public</li>
                        </ul>
        
        <div class="method-signature">
                <span class="method-result">mixed</span>
                <span class="method-name">
                        supprimer
                </span>
                                        (<span class="var-type">array</span>&nbsp;<span class="var-name">$ressources</span>)
                        </div>
        
                        <ul class="parameters">
                                        <li>
                                <span class="var-type">array</span>
                                <span class="var-name">$ressources</span><span class="var-description">: Morceaux de l'url servant à préciser la ressource concerné pour le service demandé.</span>                 </li>
                                </ul>
                
                        
        </div>
                                                
                </div>
        </div>


        <p class="notes" id="credit">
                Documentation generated on Tue, 18 Jan 2011 15:30:58 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
        </p>
        </div></body>
</html>