<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.yaf-config-simple.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'yaf-config-simple.current.php',
    1 => 'Yaf_Config_Simple::current',
    2 => 'Get current entry value',
  ),
  'up' => 
  array (
    0 => 'class.yaf-config-simple.php',
    1 => 'Yaf_Config_Simple',
  ),
  'prev' => 
  array (
    0 => 'yaf-config-simple.count.php',
    1 => 'Yaf_Config_Simple::count',
  ),
  'next' => 
  array (
    0 => 'yaf-config-simple.get.php',
    1 => 'Yaf_Config_Simple::get',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/yaf/yaf_config_simple/current.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="yaf-config-simple.current" class="refentry">
 <div class="refnamediv">
<h1 class="refname">Yaf_Config_Simple::current</h1>
<p class="verinfo">(Yaf &gt;=1.0.0)</p><p class="refpurpose"><span class="refname">Yaf_Config_Simple::current</span> &mdash; <span class="dc-title">Get current entry value</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-yaf-config-simple.current-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><strong>Yaf_Config_Simple::current</strong></span>(): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>

  <p class="simpara">Returns the value of the current configuration entry during iteration. Array values are wrapped in a <span class="classname"><a href="class.yaf-config-abstract.php" class="classname">Yaf_Config_Abstract</a></span> object.</p>
 </div>


 <div class="refsect1 parameters" id="refsect1-yaf-config-simple.current-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">У цієї функції немає
параметрів.</p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-yaf-config-simple.current-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
<p class="simpara">The value of the current entry, or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if the position is invalid.</p>
 </div>


 <div class="refsect1 examples" id="refsect1-yaf-config-simple.current-examples">
  <h3 class="title">Приклади</h3>
  <div class="example" id="example-1">
   <p><strong>Приклад #1 <span class="methodname"><strong>Yaf_Config_Simple::current()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php
$config </span><span style="color: #007700">= new </span><span style="color: #0000BB">Yaf_Config_Simple</span><span style="color: #007700">([
    </span><span style="color: #DD0000">'application' </span><span style="color: #007700">=&gt; [</span><span style="color: #DD0000">'name' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'MyApp'</span><span style="color: #007700">],
    </span><span style="color: #DD0000">'version'     </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'1.0'</span><span style="color: #007700">,
]);

</span><span style="color: #0000BB">$config</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">rewind</span><span style="color: #007700">();
while (</span><span style="color: #0000BB">$config</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">valid</span><span style="color: #007700">()) {
    </span><span style="color: #0000BB">$value </span><span style="color: #007700">= </span><span style="color: #0000BB">$config</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">current</span><span style="color: #007700">();
    if (</span><span style="color: #0000BB">$value </span><span style="color: #007700">instanceof </span><span style="color: #0000BB">Yaf_Config_Abstract</span><span style="color: #007700">) {
        echo </span><span style="color: #0000BB">$config</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">key</span><span style="color: #007700">(), </span><span style="color: #DD0000">" =&gt; &lt;config node&gt;\n"</span><span style="color: #007700">;
    } else {
        echo </span><span style="color: #0000BB">$config</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">key</span><span style="color: #007700">(), </span><span style="color: #DD0000">" =&gt; "</span><span style="color: #007700">, </span><span style="color: #0000BB">$value</span><span style="color: #007700">, </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;
    }
    </span><span style="color: #0000BB">$config</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">next</span><span style="color: #007700">();
}
</span><span style="color: #0000BB">?&gt;</span></code></pre></div>
   </div>

   <div class="example-contents"><p>Поданий вище приклад виведе щось
схоже на:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">application =&gt; &lt;config node&gt;
version =&gt; 1.0</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-yaf-config-simple.current-seealso">
  <h3 class="title">Прогляньте також</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="yaf-config-simple.key.php" class="methodname" rel="rdfs-seeAlso">Yaf_Config_Simple::key()</a> - Get current entry key</span></li>
   <li><span class="methodname"><a href="yaf-config-simple.next.php" class="methodname" rel="rdfs-seeAlso">Yaf_Config_Simple::next()</a> - Advance to next entry</span></li>
   <li><span class="methodname"><a href="yaf-config-simple.rewind.php" class="methodname" rel="rdfs-seeAlso">Yaf_Config_Simple::rewind()</a> - Reset iterator to first entry</span></li>
   <li><span class="methodname"><a href="yaf-config-simple.valid.php" class="methodname" rel="rdfs-seeAlso">Yaf_Config_Simple::valid()</a> - Check if current position is valid</span></li>
  </ul>
 </div>

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