<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="yaf-route-map.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>Yaf_Route_Map::__construct</refname>
  <refpurpose>The __construct purpose</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <constructorsynopsis>
   <modifier>public</modifier> <methodname>Yaf_Route_Map::__construct</methodname>
   <methodparam choice="opt"><type>string</type><parameter>controller_prefer</parameter><initializer>&false;</initializer></methodparam>
   <methodparam choice="opt"><type>string</type><parameter>delimiter</parameter><initializer>""</initializer></methodparam>
  </constructorsynopsis>
  <para>

  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term><parameter>controller_prefer</parameter></term>
    <listitem>
     <para>
      Whether the result should considering as controller or action
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><parameter>delimiter</parameter></term>
    <listitem>
     <para>
      
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>

  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <example>
   <title><function>Yaf_Route_Map</function>example</title>
   <programlisting role="php">
<![CDATA[
<?php
   /**
    * Add a map route to Yaf_Router route stack
    */
    Yaf_Dispatcher::getInstance()->getRouter()->addRoute("name",
        new Yaf_Route_Map());
?>
]]>
   </programlisting>
   &example.outputs.similar;
   <screen>
<![CDATA[
/* for http://yourdomain.com/product/foo/bar
 * route will result in following values:
 */
array(
  "controller" => "product_foo_bar",
)
]]>
   </screen>
  </example>
  <example>
   <title><function>Yaf_Route_Map</function>example</title>
   <programlisting role="php">
<![CDATA[
<?php
   /**
    * Add a map route to Yaf_Router route stack
    */
    Yaf_Dispatcher::getInstance()->getRouter()->addRoute("name",
        new Yaf_Route_Map(true, "_"));
?>
]]>
   </programlisting>
   &example.outputs.similar;
   <screen>
<![CDATA[
/* for http://yourdomain.com/user/list/_/foo/22
 * route will result in following values:
 */
array(
    "action" => "user_list",
)

/**
 * and request parameters:
 */
array(
  "foo"   => 22,
)
]]>
   </screen>
  </example>
  <example>
   <title><function>Yaf_Route_Map</function>example</title>
   <programlisting role="php">
<![CDATA[
<?php
   /**
    * Add a map route to Yaf_Router route stack by calling addconfig
    */
    $config = array(
        "name" => array(
           "type"  => "map",         //Yaf_Route_Map route
           "controllerPrefer" => FALSE,
           "delimiter"        => "#!", 
           ),
    );
    Yaf_Dispatcher::getInstance()->getRouter()->addConfig(
        new Yaf_Config_Simple($config));
?>
]]>
   </programlisting>
  </example>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <simplelist>
   <member><methodname>Yaf_Router::addRoute</methodname></member>
   <member><classname>Yaf_Route_Static</classname></member>
   <member><classname>Yaf_Route_Supervar</classname></member>
   <member><classname>Yaf_Route_Simple</classname></member>
   <member><classname>Yaf_Route_Regex</classname></member>
   <member><classname>Yaf_Route_Rewrite</classname></member>
  </simplelist>                       
 </refsect1>  

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
