<?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 => 'fr',
  ),
  'this' => 
  array (
    0 => 'class.yaf-bootstrap-abstract.php',
    1 => 'Yaf_Bootstrap_Abstract',
    2 => 'La classe 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' => 'fr',
    '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 classe 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">Introduction</h2>
   <p class="para">
    Bootstrap est un mécanisme utilisé pour réaliser des
    configurations initiales avant l&#039;exécution d&#039;une application.
   </p>
   <p class="para">
    Les utilisateurs peuvent définir leur propre classe
    de Bootstrap héritant de la classe
    <span class="classname"><strong class="classname">Yaf_Bootstrap_Abstract</strong></span>
   </p>
   <p class="para">
    Toutes les méthodes déclarées dans la classe Bootstrap
    commençant par &quot;_init&quot;, seront appelées par la méthode
    <span class="methodname"><a href="yaf-application.bootstrap.php" class="methodname">Yaf_Application::bootstrap()</a></span>
    une par une, et en suivant leur ordre de définition.
   </p>
  </div>


 <div class="section">
  <h2 class="title">Exemples</h2>
  <div class="example" id="example-1">
   <p><strong>Exemple #1 Bootstrap example</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 classe bootstrap doit être définie ici : ./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>Résultat de l&#039;exemple ci-dessus est similaire à :</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">Synopsis de la classe</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">/* Propriétés */</div>
    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Méthodes */</div>
   }</div>


  </div>

 </div>

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