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

contributors($setup);

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

 </div>

 <div class="refsect1 description" id="refsect1-yaf-route-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_Route_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">$module_name</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$controller_name</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$action_name</code></span>)</div>

  <p class="simpara">Construct a simple route. A simple route reads the module, controller and action names from the query variables named as the three arguments. For example, with the constructor arguments <code class="literal">module</code>, <code class="literal">controller</code> and <code class="literal">action</code>, the route matches a request like <code class="literal">/?module=foo&amp;controller=bar&amp;action=list</code>.</p>
 </div>


 <div class="refsect1 parameters" id="refsect1-yaf-route-simple.construct-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <dl>
   
    <dt><code class="parameter">module_name</code></dt>
    <dd>
     <p class="simpara">The name of the query variable that carries the module name.</p>
    </dd>
   
   
    <dt><code class="parameter">controller_name</code></dt>
    <dd>
     <p class="simpara">The name of the query variable that carries the controller name.</p>
    </dd>
   
   
    <dt><code class="parameter">action_name</code></dt>
    <dd>
     <p class="simpara">The name of the query variable that carries the action name.</p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-yaf-route-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-route-simple.construct-examples">
  <h3 class="title">Örnekler</h3>
  <div class="example" id="example-1">
   <p><strong>Örnek 1 <span class="methodname"><strong>Yaf_Route_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
</span><span style="color: #FF8000">/**
 * Add a simple route to the Yaf_Router route stack.
 *
 * The route matches requests like:
 * http://yourdomain.com/index.php?m=main&amp;c=product&amp;a=detail
 */
</span><span style="color: #0000BB">Yaf_Dispatcher</span><span style="color: #007700">::</span><span style="color: #0000BB">getInstance</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">getRouter</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">addRoute</span><span style="color: #007700">(</span><span style="color: #DD0000">"simple"</span><span style="color: #007700">,
    new </span><span style="color: #0000BB">Yaf_Route_Simple</span><span style="color: #007700">(</span><span style="color: #DD0000">"m"</span><span style="color: #007700">, </span><span style="color: #DD0000">"c"</span><span style="color: #007700">, </span><span style="color: #DD0000">"a"</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">/* http://yourdomain.com/index.php?m=main&amp;c=product&amp;a=detail
 * routes to the following values:
 */
array(
  &quot;module&quot;     =&gt; &quot;main&quot;,
  &quot;controller&quot; =&gt; &quot;product&quot;,
  &quot;action&quot;     =&gt; &quot;detail&quot;,
)</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-yaf-route-simple.construct-seealso">
  <h3 class="title">Ayrıca Bakınız</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="yaf-route-simple.route.php" class="methodname" rel="rdfs-seeAlso">Yaf_Route_Simple::route()</a> - Route a request</span></li>
   <li><span class="methodname"><a href="yaf-route-simple.assemble.php" class="methodname" rel="rdfs-seeAlso">Yaf_Route_Simple::assemble()</a> - Assemble a url</span></li>
  </ul>
 </div>

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