<?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-abstract.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'yaf-config-abstract.set.php',
    1 => 'Yaf_Config_Abstract::set',
    2 => 'Set a configuration value',
  ),
  'up' => 
  array (
    0 => 'class.yaf-config-abstract.php',
    1 => 'Yaf_Config_Abstract',
  ),
  'prev' => 
  array (
    0 => 'yaf-config-abstract.readonly.php',
    1 => 'Yaf_Config_Abstract::readonly',
  ),
  'next' => 
  array (
    0 => 'yaf-config-abstract.toarray.php',
    1 => 'Yaf_Config_Abstract::toArray',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/yaf/yaf_config_abstract/set.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="yaf-config-abstract.set" class="refentry">
 <div class="refnamediv">
<h1 class="refname">Yaf_Config_Abstract::set</h1>
<p class="verinfo">(Yaf &gt;=1.0.0)</p><p class="refpurpose"><span class="refname">Yaf_Config_Abstract::set</span> &mdash; <span class="dc-title">Set a configuration value</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-yaf-config-abstract.set-description">
  <h3 class="title">Açıklama</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">abstract</span> <span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><strong>Yaf_Config_Abstract::set</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$name</code></span>, <span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="simpara">Sets a configuration value. This method is abstract and must be implemented by subclasses. Read-only configurations will reject modifications.</p>
 </div>


 <div class="refsect1 parameters" id="refsect1-yaf-config-abstract.set-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <dl>
   
    <dt><code class="parameter">name</code></dt>
    <dd>
<p class="simpara">The configuration key to set.</p>
    </dd>
   
   
    <dt><code class="parameter">value</code></dt>
    <dd>
<p class="simpara">The value to assign.</p>
    </dd>
   
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-yaf-config-abstract.set-returnvalues">
  <h3 class="title">Dönen Değerler</h3>
<p class="simpara">Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> on success, or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on failure (e.g. when the configuration is read-only).</p>
 </div>


 <div class="refsect1 examples" id="refsect1-yaf-config-abstract.set-examples">
  <h3 class="title">Örnekler</h3>
  <div class="example" id="example-1">
   <p><strong>Örnek 1 <span class="methodname"><strong>Yaf_Config_Abstract::set()</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">'env' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'development'</span><span style="color: #007700">]);
</span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$config</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set</span><span style="color: #007700">(</span><span style="color: #DD0000">'env'</span><span style="color: #007700">, </span><span style="color: #DD0000">'production'</span><span style="color: #007700">));
echo </span><span style="color: #0000BB">$config</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">env</span><span style="color: #007700">, </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;

</span><span style="color: #FF8000">// Read-only implementations reject the modification
</span><span style="color: #0000BB">$ini </span><span style="color: #007700">= new </span><span style="color: #0000BB">Yaf_Config_Ini</span><span style="color: #007700">(</span><span style="color: #DD0000">'/etc/myapp/application.ini'</span><span style="color: #007700">, </span><span style="color: #DD0000">'common'</span><span style="color: #007700">);
</span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$ini</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set</span><span style="color: #007700">(</span><span style="color: #DD0000">'env'</span><span style="color: #007700">, </span><span style="color: #DD0000">'production'</span><span style="color: #007700">));
</span><span style="color: #0000BB">?&gt;</span></code></pre></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">bool(true)
production
bool(false)</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-yaf-config-abstract.set-seealso">
  <h3 class="title">Ayrıca Bakınız</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="yaf-config-abstract.get.php" class="methodname" rel="rdfs-seeAlso">Yaf_Config_Abstract::get()</a> - Retrieve a configuration value</span></li>
   <li><span class="methodname"><a href="yaf-config-abstract.readonly.php" class="methodname" rel="rdfs-seeAlso">Yaf_Config_Abstract::readonly()</a> - Check if configuration is read-only</span></li>
  </ul>
 </div>

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