<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.yaf-registry.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'yaf-registry.get.php',
    1 => 'Yaf_Registry::get',
    2 => 'Retrieve an item from registry',
  ),
  'up' => 
  array (
    0 => 'class.yaf-registry.php',
    1 => 'Yaf_Registry',
  ),
  'prev' => 
  array (
    0 => 'yaf-registry.del.php',
    1 => 'Yaf_Registry::del',
  ),
  'next' => 
  array (
    0 => 'yaf-registry.has.php',
    1 => 'Yaf_Registry::has',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/yaf/yaf_registry/get.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="yaf-registry.get" class="refentry">
 <div class="refnamediv">
<h1 class="refname">Yaf_Registry::get</h1>
<p class="verinfo">(Yaf &gt;=1.0.0)</p><p class="refpurpose"><span class="refname">Yaf_Registry::get</span> &mdash; <span class="dc-title">Retrieve an item from registry</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-yaf-registry.get-description">
  <h3 class="title">Açıklama</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="modifier">function</span> <span class="methodname"><strong>Yaf_Registry::get</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="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>

  <p class="simpara">Retrieves a value from the registry.</p>
 </div>


 <div class="refsect1 parameters" id="refsect1-yaf-registry.get-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <dl>
   
    <dt><code class="parameter">name</code></dt>
    <dd>
<p class="simpara">The name of the registry entry.</p>
    </dd>
   
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-yaf-registry.get-returnvalues">
  <h3 class="title">Dönen Değerler</h3>
<p class="simpara">The value stored under <code class="parameter">name</code>, or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> if there is no entry with that name.</p>
 </div>


 <div class="refsect1 examples" id="refsect1-yaf-registry.get-examples">
  <h3 class="title">Örnekler</h3>
  <div class="example" id="example-1">
   <p><strong>Örnek 1 <span class="methodname"><strong>Yaf_Registry::get()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php
</span><span style="color: #007700">class </span><span style="color: #0000BB">IndexController </span><span style="color: #007700">extends </span><span style="color: #0000BB">Yaf_Controller_Abstract
</span><span style="color: #007700">{
    public function </span><span style="color: #0000BB">indexAction</span><span style="color: #007700">()
    {
        </span><span style="color: #0000BB">$redis </span><span style="color: #007700">= </span><span style="color: #0000BB">Yaf_Registry</span><span style="color: #007700">::</span><span style="color: #0000BB">get</span><span style="color: #007700">(</span><span style="color: #DD0000">"redis"</span><span style="color: #007700">);
        if (</span><span style="color: #0000BB">$redis </span><span style="color: #007700">=== </span><span style="color: #0000BB">null</span><span style="color: #007700">) {
            throw new </span><span style="color: #0000BB">Exception</span><span style="color: #007700">(</span><span style="color: #DD0000">"the redis connection is not registered"</span><span style="color: #007700">);
        }

        </span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getView</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">assign</span><span style="color: #007700">(</span><span style="color: #DD0000">"visits"</span><span style="color: #007700">, </span><span style="color: #0000BB">$redis</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">get</span><span style="color: #007700">(</span><span style="color: #DD0000">"site:visits"</span><span style="color: #007700">));

        return </span><span style="color: #0000BB">true</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-registry.get-seealso">
  <h3 class="title">Ayrıca Bakınız</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="yaf-registry.set.php" class="methodname" rel="rdfs-seeAlso">Yaf_Registry::set()</a> - Add an item into registry</span></li>
   <li><span class="methodname"><a href="yaf-registry.has.php" class="methodname" rel="rdfs-seeAlso">Yaf_Registry::has()</a> - Check whether an item exists</span></li>
   <li><span class="methodname"><a href="yaf-registry.del.php" class="methodname" rel="rdfs-seeAlso">Yaf_Registry::del()</a> - Remove an item from registry</span></li>
  </ul>
 </div>

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