svn: /phpdoc/en/trunk/reference/yaf/ yaf_application/app.xml yaf_dispatcher/autorender.xml yaf_dispatcher/dispatch.xml
yaf_dispatcher/getapplication.xml yaf_dispatcher/registerplugin.xml
| From: | Xinchen Hui | Date: | Thu, 01 Dec 2011 12:18:46 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/yaf/ yaf_application/app.xml yaf_dispatcher/autorender.xml yaf_dispatcher/dispatch.xml yaf_dispatcher/getapplication.xml yaf_dispatcher/registerplugin.xml |
||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-9111@lists.php.net to get a copy of this message | ||
laruence Thu, 01 Dec 2011 12:18:46 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=320237
Log:
add doc for Yaf_Application::app(),
fix typos, add seealso
Changed paths:
U phpdoc/en/trunk/reference/yaf/yaf_application/app.xml
U phpdoc/en/trunk/reference/yaf/yaf_dispatcher/autorender.xml
U phpdoc/en/trunk/reference/yaf/yaf_dispatcher/dispatch.xml
U phpdoc/en/trunk/reference/yaf/yaf_dispatcher/getapplication.xml
U phpdoc/en/trunk/reference/yaf/yaf_dispatcher/registerplugin.xml
Modified: phpdoc/en/trunk/reference/yaf/yaf_application/app.xml
===================================================================
--- phpdoc/en/trunk/reference/yaf/yaf_application/app.xml 2011-12-01 12:10:49 UTC (rev 320236)
+++ phpdoc/en/trunk/reference/yaf/yaf_application/app.xml 2011-12-01 12:18:46 UTC (rev 320237)
@@ -14,7 +14,9 @@
<void />
</methodsynopsis>
<para>
-
+ Retrive the <classname>Yaf_Application</classname> instance,
+ alternatively, we also could use
+ <methodname>Yaf_Dispatcher::getApplication</methodname>.
</para>
&warn.undocumented.func;
</refsect1>
@@ -32,6 +34,12 @@
</para>
</refsect1>
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <simplelist>
+ <member><methodname>Yaf_Dispatcher::getApplication</methodname></member>
+ </simplelist>
+ </refsect1>
</refentry>
Modified: phpdoc/en/trunk/reference/yaf/yaf_dispatcher/autorender.xml
===================================================================
--- phpdoc/en/trunk/reference/yaf/yaf_dispatcher/autorender.xml 2011-12-01 12:10:49 UTC (rev 320236)
+++ phpdoc/en/trunk/reference/yaf/yaf_dispatcher/autorender.xml 2011-12-01 12:18:46 UTC (rev 320237)
@@ -14,8 +14,9 @@
<methodparam><type>bool</type><parameter>flag</parameter></methodparam>
</methodsynopsis>
<para>
- Yaf will can render after dispatched a request, you can prevent the
- rendering by calling this method with <parameter>flag</parameter> TRUE
+ <classname>Yaf_Dispatcher</classname> will render automatically after
+ dispatches a incoming request, you can prevent the rendering by calling
+ this method with <parameter>flag</parameter> TRUE
</para>
&warn.undocumented.func;
Modified: phpdoc/en/trunk/reference/yaf/yaf_dispatcher/dispatch.xml
===================================================================
--- phpdoc/en/trunk/reference/yaf/yaf_dispatcher/dispatch.xml 2011-12-01 12:10:49 UTC (rev 320236)
+++ phpdoc/en/trunk/reference/yaf/yaf_dispatcher/dispatch.xml 2011-12-01 12:18:46 UTC (rev 320237)
@@ -27,8 +27,9 @@
Routing takes place exactly once, using the values in the request object
when dispatch() is called. Dispatching takes place in a loop; a request may
either indicate multiple actions to dispatch, or the controller or a plugin
- may reset the request object to force additional actions to dispatch. When
- all is done, the <classname>Yaf_Dispatcher</classname> returns a response.
+ may reset the request object to force additional actions to dispatch(see
+ <classname>Yaf_Plugin_Abstract</classname>. When all is done, the
+ <classname>Yaf_Dispatcher</classname> returns a response.
</para>
&warn.undocumented.func;
Modified: phpdoc/en/trunk/reference/yaf/yaf_dispatcher/getapplication.xml
===================================================================
--- phpdoc/en/trunk/reference/yaf/yaf_dispatcher/getapplication.xml 2011-12-01 12:10:49 UTC (rev
320236)
+++ phpdoc/en/trunk/reference/yaf/yaf_dispatcher/getapplication.xml 2011-12-01 12:18:46 UTC (rev
320237)
@@ -15,7 +15,7 @@
</methodsynopsis>
<para>
Retrive the <classname>Yaf_Application</classname> instance. same as
- <methodname>Yaf_Application::app()</methodname>.
+ <methodname>Yaf_Application::app</methodname>.
</para>
&warn.undocumented.func;
@@ -34,6 +34,12 @@
</para>
</refsect1>
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <simplelist>
+ <member><methodname>Yaf_Application::app</methodname></member>
+ </simplelist>
+ </refsect1>
</refentry>
Modified: phpdoc/en/trunk/reference/yaf/yaf_dispatcher/registerplugin.xml
===================================================================
--- phpdoc/en/trunk/reference/yaf/yaf_dispatcher/registerplugin.xml 2011-12-01 12:10:49 UTC (rev
320236)
+++ phpdoc/en/trunk/reference/yaf/yaf_dispatcher/registerplugin.xml 2011-12-01 12:18:46 UTC (rev
320237)
@@ -14,7 +14,9 @@
<methodparam><type>Yaf_Plugin_Abstract</type><parameter>plugin</parameter></methodparam>
</methodsynopsis>
<para>
-
+ Register a plugin(see <classname>Yaf_Plugin_Abstract</classname>).
+ Generally, we register plugins in Bootstrap(see
+ <classname>Yaf_Bootstrap_Abstract</classname>).
</para>
&warn.undocumented.func;
@@ -42,7 +44,38 @@
</para>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <example>
+
<title><function>Yaf_Dispatcher::registerPlugin</function>example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+class Bootstrap extends Yaf_Bootstrap_Abstract{
+ public function _initPlugin(Yaf_Dispatcher $dispatcher) {
+ /**
+ * Yaf assumes plugin scripts under APPLICATION_PATH . "/plugins"
+ * for this case, it will be:
+ * APPLICATION_PATH . "/plugins/" . "User.php"
+ */
+ $user = new UserPlugin();
+ $dispatcher->registerPlugin($user);
+ }
+]]>
+ </programlisting>
+ </example>
+ </refsect1>
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <simplelist>
+ <member><classname>Yaf_Plugin_Abstract</classname></member>
+ </simplelist>
+ <simplelist>
+ <member><classname>Yaf_Bootstrap_Abstract</classname></member>
+ </simplelist>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file