<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.yaf-view-simple.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'yaf-view-simple.construct.php',
    1 => 'Yaf_View_Simple::__construct',
    2 => 'Constructor of Yaf_View_Simple',
  ),
  'up' => 
  array (
    0 => 'class.yaf-view-simple.php',
    1 => 'Yaf_View_Simple',
  ),
  'prev' => 
  array (
    0 => 'yaf-view-simple.clear.php',
    1 => 'Yaf_View_Simple::clear',
  ),
  'next' => 
  array (
    0 => 'yaf-view-simple.display.php',
    1 => 'Yaf_View_Simple::display',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/yaf/yaf_view_simple/construct.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

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

 </div>

 <div class="refsect1 description" id="refsect1-yaf-view-simple.construct-description">
  <h3 class="title">Açıklama</h3>
  <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span><span class="modifier">function</span> <span class="methodname"><strong>Yaf_View_Simple::__construct</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$template_dir</code></span>, <span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter">$options</code><span class="initializer"> = NULL</span></span>)</div>

  <p class="simpara"><span class="classname"><a href="class.yaf-view-simple.php" class="classname">Yaf_View_Simple</a></span> is the default and only view engine Yaf supports out of the box. An instance is created automatically by the <span class="classname"><a href="class.yaf-dispatcher.php" class="classname">Yaf_Dispatcher</a></span> when the application starts; instantiating it directly is only needed to render templates outside of the dispatch flow.</p>
  <p class="simpara">The <code class="parameter">template_dir</code> argument must point to an existing directory containing the view scripts; it becomes the script path of the view and can later be changed with <span class="methodname"><a href="yaf-view-simple.setscriptpath.php" class="methodname">Yaf_View_Simple::setScriptPath()</a></span>.</p>
 </div>


 <div class="refsect1 parameters" id="refsect1-yaf-view-simple.construct-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <dl>
   
    <dt><code class="parameter">template_dir</code></dt>
    <dd>
<p class="simpara">The directory where the template scripts are stored.</p>
    </dd>
   
   
    <dt><code class="parameter">options</code></dt>
    <dd>
<p class="simpara">Optional view options as an array. Reserved for custom view engine implementations; the built-in engine accepts but does not use it.</p>
    </dd>
   
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-yaf-view-simple.construct-returnvalues">
  <h3 class="title">Dönen Değerler</h3>
<p class="simpara">No value is returned.</p>
 </div>


 <div class="refsect1 examples" id="refsect1-yaf-view-simple.construct-examples">
  <h3 class="title">Örnekler</h3>
  <div class="example" id="example-1">
   <p><strong>Örnek 1 <span class="methodname"><strong>Yaf_View_Simple::__construct()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php
define</span><span style="color: #007700">(</span><span style="color: #DD0000">"TEMPLATE_DIRECTORY"</span><span style="color: #007700">, </span><span style="color: #0000BB">APPLICATION_PATH </span><span style="color: #007700">. </span><span style="color: #DD0000">'/views'</span><span style="color: #007700">);
</span><span style="color: #0000BB">$view </span><span style="color: #007700">= new </span><span style="color: #0000BB">Yaf_View_Simple</span><span style="color: #007700">(</span><span style="color: #0000BB">TEMPLATE_DIRECTORY</span><span style="color: #007700">);
</span><span style="color: #0000BB">$view</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">assign</span><span style="color: #007700">(</span><span style="color: #DD0000">"name"</span><span style="color: #007700">, </span><span style="color: #DD0000">"world"</span><span style="color: #007700">);
echo </span><span style="color: #0000BB">$view</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">render</span><span style="color: #007700">(</span><span style="color: #DD0000">"greeting.phtml"</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-view-simple.construct-seealso">
  <h3 class="title">Ayrıca Bakınız</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="yaf-view-simple.render.php" class="methodname" rel="rdfs-seeAlso">Yaf_View_Simple::render()</a> - Render a template</span></li>
   <li><span class="methodname"><a href="yaf-view-simple.display.php" class="methodname" rel="rdfs-seeAlso">Yaf_View_Simple::display()</a> - Render and store a template in the response</span></li>
   <li><span class="methodname"><a href="yaf-view-simple.setscriptpath.php" class="methodname" rel="rdfs-seeAlso">Yaf_View_Simple::setScriptPath()</a> - Set the template directory</span></li>
  </ul>
 </div>

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