svn: /phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/ forward.xml getrequest.xml init.xml redirect.xml

From: Date: Tue, 19 Feb 2013 13:33:15 +0000
Subject: svn: /phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/ forward.xml getrequest.xml init.xml redirect.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-11014@lists.php.net to get a copy of this message
laruence Tue, 19 Feb 2013 13:33:15 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=329504 Log: Update docs, add init and examples Changed paths: U phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/forward.xml U phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/getrequest.xml A phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/init.xml U phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/redirect.xml Modified: phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/forward.xml =================================================================== --- phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/forward.xml 2013-02-19 12:54:57 UTC (rev 329503) +++ phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/forward.xml 2013-02-19 13:33:15 UTC (rev 329504) @@ -77,6 +77,43 @@ </variablelist> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <example> + <title><function>Yaf_Controller_Abstract::forward</function>example</title> + <programlisting role="php"> +<![CDATA[ +<?php +class IndexController extends Yaf_Controller_Abstract +{ + public function indexAction(){ + $logined = $_SESSION["login"]; + if (!$logined) { + $this->forward("login", array("from" => "Index")); // forward to login action + return FALSE; // this is important, this finish current working flow + // and tell the Yaf do not doing auto-render + } + + // other processes + } + + public function loginAction() { + echo "login, redirected from ", $this->getInvokeArg("from") , " action"; + } +} +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ + login, redirected from Index action +]]> + </screen> + </example> + </refsect1> + + <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> Modified: phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/getrequest.xml =================================================================== --- phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/getrequest.xml 2013-02-19 12:54:57 UTC (rev 329503) +++ phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/getrequest.xml 2013-02-19 13:33:15 UTC (rev 329504) @@ -4,7 +4,7 @@ <refentry xml:id="yaf-controller-abstract.getrequest" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>Yaf_Controller_Abstract::getRequest</refname> - <refpurpose>The getRequest purpose</refpurpose> + <refpurpose>Retrieve current request object</refpurpose> </refnamediv> <refsect1 role="description"> @@ -14,7 +14,7 @@ <void /> </methodsynopsis> <para> - + retrieve current request object </para> </refsect1> @@ -26,7 +26,7 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - + <classname>Yaf_Request_Abstract</classname> instance </para> </refsect1> Added: phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/init.xml =================================================================== --- phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/init.xml (rev 0) +++ phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/init.xml 2013-02-19 13:33:15 UTC (rev 329504) @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 327672 $ --> + +<refentry xml:id="yaf-controller-abstract.init" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <refnamediv> + <refname>Yaf_Controller_Abstract::init</refname> + <refpurpose>Controller initializer</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <modifier>public</modifier> <type>void</type><methodname>Yaf_Controller_Abstract::init</methodname> + <void /> + </methodsynopsis> + <para> + <methodname>Yaf_Controller_Abstract::__construct</methodname> is final, + which means users can not override it. + but users can define + <methodname>Yaf_Controller_Abstract::init</methodname>, which will be + called after controller object is instantiated. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + + </para> + </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 +--> Modified: phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/redirect.xml =================================================================== --- phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/redirect.xml 2013-02-19 12:54:57 UTC (rev 329503) +++ phpdoc/en/trunk/reference/yaf/yaf_controller_abstract/redirect.xml 2013-02-19 13:33:15 UTC (rev 329504) @@ -4,17 +4,17 @@ <refentry xml:id="yaf-controller-abstract.redirect" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>Yaf_Controller_Abstract::redirect</refname> - <refpurpose>The redirect purpose</refpurpose> + <refpurpose>Redirect to a URL</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <modifier>public</modifier> <type>void</type><methodname>Yaf_Controller_Abstract::redirect</methodname> + <modifier>public</modifier> <type>bool</type><methodname>Yaf_Controller_Abstract::redirect</methodname> <methodparam><type>string</type><parameter>url</parameter></methodparam> </methodsynopsis> <para> - + redirect to a URL by sending a 302 header </para> </refsect1> @@ -25,7 +25,7 @@ <term><parameter>url</parameter></term> <listitem> <para> - + a location URL </para> </listitem> </varlistentry> @@ -35,7 +35,7 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - + bool </para> </refsect1>

« previous php.doc.cvs (#11014) next »