<?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 => 'zh',
  ),
  'this' => 
  array (
    0 => 'yaf-route-simple.construct.php',
    1 => 'Yaf_Route_Simple::__construct',
    2 => 'Yaf_Route_Simple 构造方法',
  ),
  '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' => 'zh',
    '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">Yaf_Route_Simple 构造方法</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-yaf-route-simple.construct-description">
  <h3 class="title">说明</h3>
  <div class="constructorsynopsis dc-description">
   <span class="modifier">public</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="para rdfs-comment">
   <span class="classname"><a href="class.yaf-route-simple.php" class="classname">Yaf_Route_Simple</a></span> 将从 query 字符串中获得路由信息。这个构造方法的参数会被作为键到 $_GET 中去寻找路由信息。
  </p>

  <div class="warning"><strong class="warning">警告</strong><p class="simpara">本函数还未编写文档，仅有参数列表。</p></div>

 </div>


 <div class="refsect1 parameters" id="refsect1-yaf-route-simple.construct-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt><code class="parameter">module_name</code></dt>
    <dd>
     <p class="para">
       module 信息的键名。
     </p>
    </dd>
   
   
    <dt><code class="parameter">controller_name</code></dt>
    <dd>
     <p class="para">
      controller 信息的键名。
     </p>
    </dd>
   
   
    <dt><code class="parameter">action_name</code></dt>
    <dd>
     <p class="para">
      action 信息的键名。
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-yaf-route-simple.construct-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   总是返回 <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-yaf-route-simple.construct-examples">
  <h3 class="title">示例</h3>
  <div class="example" id="example-1">
   <p><strong>示例 #1 <span class="function"><a href="yaf-route-simple.route.php" class="function">Yaf_Route_Simple::route()</a></span> 示例</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />   $route </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">"controller"</span><span style="color: #007700">, </span><span style="color: #DD0000">"act"</span><span style="color: #007700">);<br />   </span><span style="color: #0000BB">Yaf_Router</span><span style="color: #007700">::</span><span style="color: #0000BB">getInstance</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">, </span><span style="color: #0000BB">$route</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
  <div class="example" id="example-2">
   <p><strong>示例 #2 <span class="function"><a href="yaf-route-simple.route.php" class="function">Yaf_Route_Simple::route()</a></span>example</strong></p>
   <div class="example-contents">
<div class="bashcode"><pre class="bashcode">Request: http://yourdomain.com/path/?controller=a&amp;act=b
=&gt; module = default(index), controller = a, action = b

Request: http://yourdomain.com/path
=&gt; module = default(index), controller = default(index), action = default(index)</pre>
</div>
   </div>

  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-yaf-route-simple.construct-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="yaf-route-supervar.route.php" class="methodname" rel="rdfs-seeAlso">Yaf_Route_Supervar::route()</a> - The route purpose</span></li>
   <li><span class="methodname"><a href="yaf-route-static.route.php" class="methodname" rel="rdfs-seeAlso">Yaf_Route_Static::route()</a> - 路由请求</span></li>
   <li><span class="methodname"><a href="yaf-route-regex.route.php" class="methodname" rel="rdfs-seeAlso">Yaf_Route_Regex::route()</a> - The route purpose</span></li>
   <li><span class="methodname"><a href="yaf-route-rewrite.route.php" class="methodname" rel="rdfs-seeAlso">Yaf_Route_Rewrite::route()</a> - The route purpose</span></li>
   <li><span class="methodname"><a href="yaf-route-map.route.php" class="methodname" rel="rdfs-seeAlso">Yaf_Route_Map::route()</a> - The route purpose</span></li>
  </ul>                       
 </div>
  

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