<?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 => 'es',
  ),
  'this' => 
  array (
    0 => 'yaf-plugin-abstract.routershutdown.php',
    1 => 'Yaf_Plugin_Abstract::routerShutdown',
    2 => 'El prop&oacute;sito de routerShutdown',
  ),
  'up' => 
  array (
    0 => 'class.yaf-plugin-abstract.php',
    1 => 'Yaf_Plugin_Abstract',
  ),
  'prev' => 
  array (
    0 => 'yaf-plugin-abstract.preresponse.php',
    1 => 'Yaf_Plugin_Abstract::preResponse',
  ),
  'next' => 
  array (
    0 => 'yaf-plugin-abstract.routerstartup.php',
    1 => 'Yaf_Plugin_Abstract::routerStartup',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/yaf/yaf_plugin_abstract/routershutdown.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="yaf-plugin-abstract.routershutdown" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Yaf_Plugin_Abstract::routerShutdown</h1>
  <p class="verinfo">(Yaf &gt;=1.0.0)</p><p class="refpurpose"><span class="refname">Yaf_Plugin_Abstract::routerShutdown</span> &mdash; <span class="dc-title">El propósito de routerShutdown</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-yaf-plugin-abstract.routershutdown-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Yaf_Plugin_Abstract::routerShutdown</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="para rdfs-comment">
   Este enganche será provocado después de que finalice el proceso de enrutamiento. Este enganche
   se usa normalmente para la verificación de identificación.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-yaf-plugin-abstract.routershutdown-parameters">
  <h3 class="title">Parámetros</h3>
  <dl>
   
    <dt><code class="parameter">request</code></dt>
    <dd>
     <p class="para">

     </p>
    </dd>
   
   
    <dt><code class="parameter">response</code></dt>
    <dd>
     <p class="para">

     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-yaf-plugin-abstract.routershutdown-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-yaf-plugin-abstract.routershutdown-examples">
  <h3 class="title">Ejemplos</h3>
  <div class="example" id="example-1">
   <p><strong>Ejemplo #1 Ejemplo de <span class="function"><strong>Yaf_Plugin_Abstract::routerShutdown()</strong></span></strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">class </span><span style="color: #0000BB">UserInitPlugin </span><span style="color: #007700">extends </span><span style="color: #0000BB">Yaf_Plugin_Abstract </span><span style="color: #007700">{<br /><br />    public function </span><span style="color: #0000BB">routerShutdown</span><span style="color: #007700">(</span><span style="color: #0000BB">Yaf_Request_Abstract $petición</span><span style="color: #007700">, </span><span style="color: #0000BB">Yaf_Response_Abstract $respuesta</span><span style="color: #007700">) {<br />        </span><span style="color: #0000BB">$controlador </span><span style="color: #007700">= </span><span style="color: #0000BB">$petición</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getControllerName</span><span style="color: #007700">();<br /><br />        </span><span style="color: #FF8000">/**<br />         * El uso de accesos a controladores no es necesario para APIs<br />         */<br />        </span><span style="color: #007700">if (</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">strtolower</span><span style="color: #007700">(</span><span style="color: #0000BB">$controlador</span><span style="color: #007700">), array(<br />            </span><span style="color: #DD0000">'api'</span><span style="color: #007700">,<br />        ))) {<br />            return </span><span style="color: #0000BB">TRUE</span><span style="color: #007700">;<br />        }<br /><br />        if (</span><span style="color: #0000BB">Yaf_Session</span><span style="color: #007700">::</span><span style="color: #0000BB">getInstance</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">has</span><span style="color: #007700">(</span><span style="color: #DD0000">"login"</span><span style="color: #007700">)) {<br />            return </span><span style="color: #0000BB">TRUE</span><span style="color: #007700">;<br />        }<br /><br />        </span><span style="color: #FF8000">/* El uso de verificación de acceso falló, se necesita identificarse */<br />        </span><span style="color: #0000BB">$respuesta</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setRedirect</span><span style="color: #007700">(</span><span style="color: #DD0000">"http://yourdomain.com/login/"</span><span style="color: #007700">);<br />        return </span><span style="color: #0000BB">FALSE</span><span style="color: #007700">;<br />    }<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-yaf-plugin-abstract.routershutdown-seealso">
  <h3 class="title">Ver también</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> - Enganche deEl prop&oacute;sito de routerStartup</span></li>
   <li><span class="methodname"><a href="yaf-plugin-abstract.dispatchloopstartup.php" class="methodname" rel="rdfs-seeAlso">Yaf_Plugin_Abstract::dispatchLoopStartup()</a> - Enganchar antes del bucle de env&iacute;o</span></li>
   <li><span class="methodname"><a href="yaf-plugin-abstract.predispatch.php" class="methodname" rel="rdfs-seeAlso">Yaf_Plugin_Abstract::preDispatch()</a> - El prop&oacute;sito de preDispatch</span></li>
   <li><span class="methodname"><a href="yaf-plugin-abstract.postdispatch.php" class="methodname" rel="rdfs-seeAlso">Yaf_Plugin_Abstract::postDispatch()</a> - El prop&oacute;sito de postDispatch</span></li>
   <li><span class="methodname"><a href="yaf-plugin-abstract.dispatchloopshutdown.php" class="methodname" rel="rdfs-seeAlso">Yaf_Plugin_Abstract::dispatchLoopShutdown()</a> - El prop&oacute;sito de dispatchLoopShutdown</span></li>
  </ul>
 </div>


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