svn: /phpdoc/en/trunk/reference/yaf/ yaf-view-interface.xml yaf_route_regex/route.xml yaf_route_simple/construct.xml yaf_route_supervar/construct.xml
yaf_route_supervar/route.xml
| From: | Xinchen Hui | Date: | Sun, 04 Dec 2011 11:20:29 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/yaf/ yaf-view-interface.xml yaf_route_regex/route.xml yaf_route_simple/construct.xml yaf_route_supervar/construct.xml yaf_route_supervar/route.xml |
||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-9141@lists.php.net to get a copy of this message | ||
laruence Sun, 04 Dec 2011 11:20:29 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=320357
Log:
Add example for yaf_route_supervar
Changed paths:
U phpdoc/en/trunk/reference/yaf/yaf-view-interface.xml
U phpdoc/en/trunk/reference/yaf/yaf_route_regex/route.xml
U phpdoc/en/trunk/reference/yaf/yaf_route_simple/construct.xml
U phpdoc/en/trunk/reference/yaf/yaf_route_supervar/construct.xml
U phpdoc/en/trunk/reference/yaf/yaf_route_supervar/route.xml
Modified: phpdoc/en/trunk/reference/yaf/yaf-view-interface.xml
===================================================================
--- phpdoc/en/trunk/reference/yaf/yaf-view-interface.xml 2011-12-04 10:41:36 UTC (rev 320356)
+++ phpdoc/en/trunk/reference/yaf/yaf-view-interface.xml 2011-12-04 11:20:29 UTC (rev 320357)
@@ -12,7 +12,10 @@
<section xml:id="yaf-view-interface.intro">
&reftitle.intro;
<para>
-
+ Yaf provides a ability for developers to use coustom view engine instead
+ of build-in engine which is <classname>Yaf_View_Simple</classname>. There
+ is a example to explain how to do this, please see
+ <methodname>Yaf_Dispatcher::setView</methodname>.
</para>
</section>
<!-- }}} -->
Modified: phpdoc/en/trunk/reference/yaf/yaf_route_regex/route.xml
===================================================================
--- phpdoc/en/trunk/reference/yaf/yaf_route_regex/route.xml 2011-12-04 10:41:36 UTC (rev 320356)
+++ phpdoc/en/trunk/reference/yaf/yaf_route_regex/route.xml 2011-12-04 11:20:29 UTC (rev 320357)
@@ -14,7 +14,7 @@
<methodparam><type>Yaf_Request_Abstract</type><parameter>request</parameter></methodparam>
</methodsynopsis>
<para>
-
+ Route a incoming request.
</para>
&warn.undocumented.func;
@@ -38,7 +38,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
-
+ If the pattern given by the first parameter of
+ <methodname>Yaf_Route_Regex::_construct</methodname> matche the request
+ uri, return TRUE, otherwise return FALSE.
</para>
</refsect1>
Modified: phpdoc/en/trunk/reference/yaf/yaf_route_simple/construct.xml
===================================================================
--- phpdoc/en/trunk/reference/yaf/yaf_route_simple/construct.xml 2011-12-04 10:41:36 UTC (rev
320356)
+++ phpdoc/en/trunk/reference/yaf/yaf_route_simple/construct.xml 2011-12-04 11:20:29 UTC (rev
320357)
@@ -58,6 +58,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
+ Always return TRUE.
</para>
</refsect1>
@@ -88,7 +89,6 @@
</example>
</refsect1>
-
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
Modified: phpdoc/en/trunk/reference/yaf/yaf_route_supervar/construct.xml
===================================================================
--- phpdoc/en/trunk/reference/yaf/yaf_route_supervar/construct.xml 2011-12-04 10:41:36 UTC (rev
320356)
+++ phpdoc/en/trunk/reference/yaf/yaf_route_supervar/construct.xml 2011-12-04 11:20:29 UTC (rev
320357)
@@ -31,7 +31,7 @@
<term><parameter>supervar_name</parameter></term>
<listitem>
<para>
-
+ The name of key.
</para>
</listitem>
</varlistentry>
@@ -41,11 +41,56 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
-
</para>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <example>
+ <title><function>Yaf_Route_Supervar</function>example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+ /**
+ * Add a supervar route to Yaf_Router route stack
+ */
+ Yaf_Dispatcher::getInstance()->getRouter()->addRoute("name",
+ new Yaf_Route_Supervar("r"));
+ );
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+/** for request: http://yourdomain.com/xx/oo/?r=/ctr/act/var/value
+ * will result in following:
+ */
+ array (
+ "module" => index(default),
+ "controller" => ctr,
+ "action" => act,
+ "params" => array(
+ "var" => value,
+ )
+ )
+]]>
+ </screen>
+ </example>
+ </refsect1>
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <simplelist>
+ <member><methodname>Yaf_Router::addRoute</methodname></member>
+ <member><methodname>Yaf_Router::addConfig</methodname></member>
+ <member><classname>Yaf_Route_Static</classname></member>
+ <member><classname>Yaf_Route_Regex</classname></member>
+ <member><classname>Yaf_Route_Simple</classname></member>
+ <member><classname>Yaf_Route_Rewrite</classname></member>
+ <member><classname>Yaf_Route_Map</classname></member>
+ </simplelist>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
Modified: phpdoc/en/trunk/reference/yaf/yaf_route_supervar/route.xml
===================================================================
--- phpdoc/en/trunk/reference/yaf/yaf_route_supervar/route.xml 2011-12-04 10:41:36 UTC (rev 320356)
+++ phpdoc/en/trunk/reference/yaf/yaf_route_supervar/route.xml 2011-12-04 11:20:29 UTC (rev 320357)
@@ -38,7 +38,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
-
+ If there is a key(which was defined in
+ <methodname>Yaf_Route_Supervar::__construct</methodname>) in $_GET, return TRUE.
+ otherwise return FALSE.
</para>
</refsect1>