<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.yaf.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'class.yaf-bootstrap-abstract.php',
    1 => 'Yaf_Bootstrap_Abstract',
    2 => 'La clase Yaf_Bootstrap_Abstract',
  ),
  'up' => 
  array (
    0 => 'book.yaf.php',
    1 => 'Yaf',
  ),
  'prev' => 
  array (
    0 => 'yaf-application.setappdirectory.php',
    1 => 'Yaf_Application::setAppDirectory',
  ),
  'next' => 
  array (
    0 => 'class.yaf-dispatcher.php',
    1 => 'Yaf_Dispatcher',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/yaf/yaf-bootstrap-abstract.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.yaf-bootstrap-abstract" class="reference">

 <h1 class="title">La clase Yaf_Bootstrap_Abstract</h1>
 

 <div class="partintro"><p class="verinfo">(No version information available, might only be in Git)</p>

  
  <div class="section" id="yaf-bootstrap-abstract.intro">
   <h2 class="title">Introducción</h2>
   <p class="para">
    El arranque (bootstrap) es un mecanismo usado para realizar una configuración inicial antes
    de ejecutar una Aplicación.
   </p>
   <p class="para">
    Los usuarios puede definir su propia clase Bootstrap heredando la clase
    <span class="classname"><strong class="classname">Yaf_Bootstrap_Abstract</strong></span>
   </p>
   <p class="para">
    Cualquier método declarado en la clase Arranque al que se le anteponga &quot;_init&quot; será
    llamado uno a uno por el método <span class="methodname"><a href="yaf-application.bootstrap.php" class="methodname">Yaf_Application::bootstrap()</a></span>
    según su orden de definición.
   </p>
  </div>
  

  <div class="section">
   <h2 class="title">Ejemplos</h2>
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Ejemplo de arranque</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: #FF8000">/* la clase de arranque debería estar definida bajo ./application/Bootstrap.php */<br />   </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">{<br />        public function </span><span style="color: #0000BB">_initConfig</span><span style="color: #007700">(</span><span style="color: #0000BB">Yaf_Dispatcher $dispatcher</span><span style="color: #007700">) {<br />            </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">__METHOD__</span><span style="color: #007700">);<br />        }<br />        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">) {<br />            </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">__METHOD__</span><span style="color: #007700">);<br />        }<br />   }<br /><br />   </span><span style="color: #0000BB">$config </span><span style="color: #007700">= array(<br />       </span><span style="color: #DD0000">"application" </span><span style="color: #007700">=&gt; array(<br />           </span><span style="color: #DD0000">"directory" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">dirname</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">) . </span><span style="color: #DD0000">"/application/"</span><span style="color: #007700">,<br />       ),<br />   );<br /><br />   </span><span style="color: #0000BB">$app </span><span style="color: #007700">= new </span><span style="color: #0000BB">Yaf_Application</span><span style="color: #007700">(</span><span style="color: #0000BB">$config</span><span style="color: #007700">);<br />   </span><span style="color: #0000BB">$app</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">bootstrap</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Resultado del ejemplo anterior es similar a:</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
string(22) &quot;Bootstrap::_initConfig&quot;
string(22) &quot;Bootstrap::_initPlugin&quot;
</pre></div>
    </div>
   </div>
  </div>

  <div class="section" id="yaf-bootstrap-abstract.synopsis">
   <h2 class="title">Sinopsis de la Clase</h2>

   
   <div class="classsynopsis">
    <span class="ooclass"><strong class="classname"></strong></span>

    
    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">abstract</span>
      <span class="modifier">class</span> <strong class="classname">Yaf_Bootstrap_Abstract</strong>
     </span>
     {</div>
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Propiedades */</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Métodos */</div>
   }</div>
   

  </div>

 </div>

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