<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.yaf-plugin-abstract.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'yaf-plugin-abstract.dispatchloopshutdown.php',
    1 => 'Yaf_Plugin_Abstract::dispatchLoopShutdown',
    2 => 'Hook apr&egrave;s la boucle de distribution',
  ),
  'up' => 
  array (
    0 => 'class.yaf-plugin-abstract.php',
    1 => 'Yaf_Plugin_Abstract',
  ),
  'prev' => 
  array (
    0 => 'class.yaf-plugin-abstract.php',
    1 => 'Yaf_Plugin_Abstract',
  ),
  'next' => 
  array (
    0 => 'yaf-plugin-abstract.dispatchloopstartup.php',
    1 => 'Yaf_Plugin_Abstract::dispatchLoopStartup',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/yaf/yaf_plugin_abstract/dispatchloopshutdown.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="yaf-plugin-abstract.dispatchloopshutdown" class="refentry">
 <div class="refnamediv">
<h1 class="refname">Yaf_Plugin_Abstract::dispatchLoopShutdown</h1>
<p class="verinfo">(Yaf &gt;=1.0.0)</p><p class="refpurpose"><span class="refname">Yaf_Plugin_Abstract::dispatchLoopShutdown</span> &mdash; <span class="dc-title">Hook après la boucle de distribution</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-yaf-plugin-abstract.dispatchloopshutdown-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><strong>Yaf_Plugin_Abstract::dispatchLoopShutdown</strong></span>(<span class="methodparam"><span class="type"><a href="class.yaf-request-abstract.php" class="type Yaf_Request_Abstract">Yaf_Request_Abstract</a></span> <code class="parameter">$request</code></span>, <span class="methodparam"><span class="type"><a href="class.yaf-response-abstract.php" class="type Yaf_Response_Abstract">Yaf_Response_Abstract</a></span> <code class="parameter">$response</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="simpara">Ce hook est déclenché une seule fois, après que la boucle de distribution est terminée et que toutes les actions ont été exécutées, mais avant que la réponse ne soit envoyée au client. Il est habituellement utilisé pour la journalisation ou le nettoyage.</p>
 </div>


 <div class="refsect1 parameters" id="refsect1-yaf-plugin-abstract.dispatchloopshutdown-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <dl>
   
    <dt><code class="parameter">request</code></dt>
    <dd>
<p class="simpara">L&#039;instance de <span class="classname"><a href="class.yaf-request-abstract.php" class="classname">Yaf_Request_Abstract</a></span> en cours de distribution.</p>
    </dd>
   
   
    <dt><code class="parameter">response</code></dt>
    <dd>
<p class="simpara">L&#039;instance de <span class="classname"><a href="class.yaf-response-abstract.php" class="classname">Yaf_Response_Abstract</a></span>.</p>
    </dd>
   
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-yaf-plugin-abstract.dispatchloopshutdown-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
<p class="simpara">Aucune valeur n&#039;est retournée.</p>
 </div>


 <div class="refsect1 examples" id="refsect1-yaf-plugin-abstract.dispatchloopshutdown-examples">
  <h3 class="title">Exemples</h3>
  <div class="example" id="example-2">
   <p><strong>Exemple #1 Exemple avec <span class="methodname"><strong>Yaf_Plugin_Abstract::dispatchLoopShutdown()</strong></span></strong></p>
   <div class="example-contents">
<div class="phpcode"><pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php
</span><span style="color: #007700">class </span><span style="color: #0000BB">AccessLogPlugin </span><span style="color: #007700">extends </span><span style="color: #0000BB">Yaf_Plugin_Abstract
</span><span style="color: #007700">{
    public function </span><span style="color: #0000BB">dispatchLoopShutdown</span><span style="color: #007700">(</span><span style="color: #0000BB">Yaf_Request_Abstract $request</span><span style="color: #007700">, </span><span style="color: #0000BB">Yaf_Response_Abstract $response</span><span style="color: #007700">)
    {
        </span><span style="color: #FF8000">/* dernier hook avant l'envoi de la réponse : écriture d'une
         * entrée dans le journal d'accès */
        </span><span style="color: #0000BB">error_log</span><span style="color: #007700">(</span><span style="color: #0000BB">sprintf</span><span style="color: #007700">(
            </span><span style="color: #DD0000">"[%s] %s distribué vers %s/%s"</span><span style="color: #007700">,
            </span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">"c"</span><span style="color: #007700">),
            </span><span style="color: #0000BB">$request</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getRequestUri</span><span style="color: #007700">(),
            </span><span style="color: #0000BB">$request</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getControllerName</span><span style="color: #007700">(),
            </span><span style="color: #0000BB">$request</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getActionName</span><span style="color: #007700">()
        ));
    }
}

</span><span style="color: #FF8000">/* les plugins sont enregistrés dans le bootstrap */
</span><span style="color: #007700">class </span><span style="color: #0000BB">Bootstrap </span><span style="color: #007700">extends </span><span style="color: #0000BB">Yaf_Bootstrap_Abstract
</span><span style="color: #007700">{
    public function </span><span style="color: #0000BB">_initPlugin</span><span style="color: #007700">(</span><span style="color: #0000BB">Yaf_Dispatcher $dispatcher</span><span style="color: #007700">)
    {
        </span><span style="color: #0000BB">$dispatcher</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">registerPlugin</span><span style="color: #007700">(new </span><span style="color: #0000BB">AccessLogPlugin</span><span style="color: #007700">());
    }
}
</span><span style="color: #0000BB">?&gt;</span></code></pre></div>
   </div>

  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-yaf-plugin-abstract.dispatchloopshutdown-seealso">
  <h3 class="title">Voir aussi</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="yaf-plugin-abstract.routerstartup.php" class="methodname" rel="rdfs-seeAlso">Yaf_Plugin_Abstract::routerStartup()</a> - Point d'accroche avant le routage</span></li>
   <li><span class="methodname"><a href="yaf-plugin-abstract.routershutdown.php" class="methodname" rel="rdfs-seeAlso">Yaf_Plugin_Abstract::routerShutdown()</a> - Point d'accroche apr&egrave;s le routage</span></li>
   <li><span class="methodname"><a href="yaf-plugin-abstract.dispatchloopstartup.php" class="methodname" rel="rdfs-seeAlso">Yaf_Plugin_Abstract::dispatchLoopStartup()</a> - Hook avant la boucle de distribution</span></li>
   <li><span class="methodname"><a href="yaf-plugin-abstract.predispatch.php" class="methodname" rel="rdfs-seeAlso">Yaf_Plugin_Abstract::preDispatch()</a> - Hook avant chaque distribution</span></li>
   <li><span class="methodname"><a href="yaf-plugin-abstract.postdispatch.php" class="methodname" rel="rdfs-seeAlso">Yaf_Plugin_Abstract::postDispatch()</a> - Hook apr&egrave;s chaque distribution</span></li>
   <li><span class="methodname"><a href="yaf-plugin-abstract.preresponse.php" class="methodname" rel="rdfs-seeAlso">Yaf_Plugin_Abstract::preResponse()</a> - Point d'accroche avant l'envoi de la r&eacute;ponse</span></li>
  </ul>
 </div>

</div><?php manual_footer($setup); ?>