<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.yaf-application.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'yaf-application.construct.php',
    1 => 'Yaf_Application::__construct',
    2 => 'Yaf_Application constructor',
  ),
  'up' => 
  array (
    0 => 'class.yaf-application.php',
    1 => 'Yaf_Application',
  ),
  'prev' => 
  array (
    0 => 'yaf-application.clearlasterror.php',
    1 => 'Yaf_Application::clearLastError',
  ),
  'next' => 
  array (
    0 => 'yaf-application.destruct.php',
    1 => 'Yaf_Application::__destruct',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/yaf/yaf_application/construct.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="yaf-application.construct" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Yaf_Application::__construct</h1>
  <p class="verinfo">(Yaf &gt;=1.0.0)</p><p class="refpurpose"><span class="refname">Yaf_Application::__construct</span> &mdash; <span class="dc-title">Yaf_Application constructor</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-yaf-application.construct-description">
  <h3 class="title">Açıklama</h3>
  <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Yaf_Application::__construct</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$config</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$envrion</code><span class="initializer"> = ?</span></span>)</div>

  <p class="para rdfs-comment">
   Instance a <span class="classname"><a href="class.yaf-application.php" class="classname">Yaf_Application</a></span>.
  </p>



 </div>


 <div class="refsect1 parameters" id="refsect1-yaf-application.construct-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <dl>
   
    <dt><code class="parameter">config</code></dt>
    <dd>
     <p class="para">
       A ini config file path, or a config array
     </p>
     <p class="para">
       If is a ini config file, there should be a section named as the one
       defined by <a href="yaf.configuration.php#ini.yaf.environ" class="link">yaf.environ</a>, which
       is &quot;product&quot; by default.
      <blockquote class="note"><p><strong class="note">Bilginize</strong>: 
       <p class="para">
        If you use a ini configuration file as your applicatioin&#039;s config
        container. you would open the <a href="yaf.configuration.php#ini.yaf.cache-config" class="link">yaf.cache_config</a> to improve
        performance.
       </p>
      </p></blockquote>
     </p>
     <p class="para">
       And the config entry(and there default value) list blow:
      <div class="example" id="example-1">
       <p><strong>Örnek 1 A ini config file example</strong></p>
       <div class="example-contents">
<div class="inicode"><pre class="inicode">[product]
;this one should alway be defined, and have no default value
application.directory=APPLICATION_PATH

;following configs have default value, you may no need to define them
application.library = APPLICATION_PATH . &quot;/library&quot;
application.dispatcher.throwException=1
application.dispatcher.catchException=1

application.baseUri=&quot;&quot;

;the php script ext name
ap.ext=php

;the view template ext name
ap.view.ext=phtml

ap.dispatcher.defaultModule=Index
ap.dispatcher.defaultController=Index
ap.dispatcher.defaultAction=index

;defined modules
ap.modules=Index</pre>
</div>
       </div>

      </div>
     </p>
    </dd>
   
   
    <dt><code class="parameter">envrion</code></dt>
    <dd>
     <p class="para">
      Which section will be loaded as the final config
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-yaf-application.construct-returnvalues">
  <h3 class="title">Dönen Değerler</h3>
  <p class="para">

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-yaf-application.construct-examples">
  <h3 class="title">Örnekler</h3>
  <div class="example" id="example-2">
   <p><strong>Örnek 2 <span class="function"><strong>Yaf_Application::__construct()</strong></span>example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />defined</span><span style="color: #007700">(</span><span style="color: #DD0000">'APPLICATION_PATH'</span><span style="color: #007700">)                  </span><span style="color: #FF8000">// APPLICATION_PATH will be used in the ini config file<br />    </span><span style="color: #007700">|| </span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'APPLICATION_PATH'</span><span style="color: #007700">, </span><span style="color: #0000BB">__DIR__</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$application </span><span style="color: #007700">= new </span><span style="color: #0000BB">Yaf_Application</span><span style="color: #007700">(</span><span style="color: #0000BB">APPLICATION_PATH</span><span style="color: #007700">.</span><span style="color: #DD0000">'/conf/application.ini'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$application</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">bootstrap</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">run</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>
Yukarıdaki örnek şuna benzer bir çıktı üretir:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode"></pre>
</div>
   </div>
  </div>
  <div class="example" id="example-3">
   <p><strong>Örnek 3 <span class="function"><strong>Yaf_Application::__construct()</strong></span>example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$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">realpath</span><span style="color: #007700">(</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: #FF8000">/** Yaf_Application */<br /></span><span style="color: #0000BB">$application </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">$application</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">bootstrap</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">run</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>
Yukarıdaki örnek şuna benzer bir çıktı üretir:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode"></pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-yaf-application.construct-seealso">
  <h3 class="title">Ayrıca Bakınız</h3>
  <ul class="simplelist">
   <li><span class="classname"><a href="class.yaf-config-ini.php" class="classname">Yaf_Config_Ini</a></span></li>
  </ul>
 </div>


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