<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>The Yaf_Route_Map class</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="yaf-route-interface.route.html">Yaf_Route_Interface::route</a></div> <div class="next" style="text-align: right; float: right;"><a href="yaf-route-map.construct.html">Yaf_Route_Map::__construct</a></div> <div class="up"><a href="book.yaf.html">Yaf</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="class.yaf-route-map" class="reference"> <h1 class="title">The Yaf_Route_Map class</h1> <div class="partintro"><p class="verinfo">(Yaf >=1.0.0)</p> <div class="section" id="yaf-route-map.intro"> <h2 class="title">Introduction</h2> <p class="para"> <strong class="classname">Yaf_Route_Map</strong> is a built-in route, it simply convert a URI endpoint (that part of the URI which comes after the base URI: see <span class="methodname"><a href="yaf-request-abstract.setbaseuri.html" class="methodname">Yaf_Request_Abstract::setBaseUri()</a></span>) to a controller name or action name(depends on the paramter passed to <span class="methodname"><a href="yaf-route-map.construct.html" class="methodname">Yaf_Route_Map::__construct()</a></span>) in following rule: A => controller A. A/B/C => controller A_B_C. A/B/C/D/E => controller A_B_C_D_E. </p> <p class="para"> If the second parameter of <span class="methodname"><a href="yaf-route-map.construct.html" class="methodname">Yaf_Route_Map::__construct()</a></span> is specificed, then only the part before delimeter of URI will used to routing, the part after it is used to routing request parameters (see the example section of <span class="methodname"><a href="yaf-route-map.construct.html" class="methodname">Yaf_Route_Map::__construct()</a></span>). </p> </div> <div class="section" id="yaf-route-map.synopsis"> <h2 class="title">Class synopsis</h2> <div class="classsynopsis"> <div class="ooclass"></div> <div class="classsynopsisinfo"> <span class="ooclass"> <strong class="classname">Yaf_Route_Map</strong> </span> <span class="oointerface">implements <span class="interfacename"><a href="class.yaf-route-interface.html" class="interfacename">Yaf_Route_Interface</a></span> </span> {</div> <div class="classsynopsisinfo classsynopsisinfo_comment">/* Properties */</div> <div class="fieldsynopsis"> <span class="modifier">protected</span> <var class="varname"><a href="class.yaf-route-map.html#yaf-route-map.props.ctl-router">$<var class="varname">_ctl_router</var></a></var> ;</div> <div class="fieldsynopsis"> <span class="modifier">protected</span> <var class="varname"><a href="class.yaf-route-map.html#yaf-route-map.props.delimeter">$<var class="varname">_delimeter</var></a></var> ;</div> <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="methodname"><a href="yaf-route-map.construct.html" class="methodname">__construct</a></span> ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$controller_prefer</code><span class="initializer"> = false</span></span> [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$delimiter</code><span class="initializer"> = ''</span></span> ]] )</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><a href="yaf-route-map.route.html" class="methodname">route</a></span> ( <span class="methodparam"><span class="type"><a href="class.yaf-request-abstract.html" class="type Yaf_Request_Abstract">Yaf_Request_Abstract</a></span> <code class="parameter">$request</code></span> )</div> }</div> </div> <div class="section" id="yaf-route-map.props"> <h2 class="title">Properties</h2> <dl> <dt id="yaf-route-map.props.ctl-router"> <span class="term"><var class="varname"><var class="varname">_ctl_router</var></var></span> <dd> <p class="para"/> </dd> </dt> <dt id="yaf-route-map.props.delimeter"> <span class="term"><var class="varname"><var class="varname">_delimeter</var></var></span> <dd> <p class="para"/> </dd> </dt> </dl> </div> </div> <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="yaf-route-map.construct.html">Yaf_Route_Map::__construct</a> — The __construct purpose</li><li><a href="yaf-route-map.route.html">Yaf_Route_Map::route</a> — The route purpose</li></ul> </div> <hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="yaf-route-interface.route.html">Yaf_Route_Interface::route</a></div> <div class="next" style="text-align: right; float: right;"><a href="yaf-route-map.construct.html">Yaf_Route_Map::__construct</a></div> <div class="up"><a href="book.yaf.html">Yaf</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>