소스 검색

[DOCUMENTATION] English:

-  manual fixes

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@16178 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas 16 년 전
부모
커밋
d29ddf29eb

+ 10 - 9
documentation/manual/en/module_specs/Zend_Controller-Plugins-ActionStack.xml

@@ -4,7 +4,7 @@
     <title>ActionStack</title>
 
     <para>
-        The <code>ActionStack</code> plugin allows you to manage a stack of
+        The <emphasis>ActionStack</emphasis> plugin allows you to manage a stack of
         requests, and operates as a <code>postDispatch</code> plugin. If a
         forward (i.e., a call to another action) is already detected in the
         current request object, it does nothing. However, if not, it checks its
@@ -21,34 +21,35 @@
 
     <itemizedlist>
         <listitem><para>
-                <code>getRegistry()</code> and <code>setRegistry()</code>.
-                Internally, <code>ActionStack</code> uses a
+                <methodname>getRegistry()</methodname> and <methodname>setRegistry()</methodname>.
+                Internally, <emphasis>ActionStack</emphasis> uses a
                 <classname>Zend_Registry</classname> instance to store the stack. You can
                 substitute a different registry instance or retrieve it with
                 these accessors.
         </para></listitem>
 
         <listitem><para>
-                <code>getRegistryKey()</code> and <code>setRegistryKey()</code>.
+                <methodname>getRegistryKey()</methodname> and
+                <methodname>setRegistryKey()</methodname>.
                 These can be used to indicate which registry key to use when
                 pulling the stack. Default value is
                 'Zend_Controller_Plugin_ActionStack'.
         </para></listitem>
 
         <listitem><para>
-                <code>getStack()</code> allows you to retrieve the stack of
+                <methodname>getStack()</methodname> allows you to retrieve the stack of
                 actions in its entirety.
         </para></listitem>
 
         <listitem><para>
-                <code>pushStack()</code> and <code>popStack()</code> allow you
-                to add to and pull from the stack, respectively.
-                <code>pushStack()</code> accepts a request object.
+                <methodname>pushStack()</methodname> and <methodname>popStack()</methodname> allow
+                you to add to and pull from the stack, respectively.
+                <methodname>pushStack()</methodname> accepts a request object.
         </para></listitem>
     </itemizedlist>
 
     <para>
-        An additional method, <code>forward()</code>, expects a request object,
+        An additional method, <methodname>forward()</methodname>, expects a request object,
         and sets the state of the current request object in the front controller
         to the state of the provided request object, and markes it as
         undispatched (forcing another iteration of the dispatch loop).

+ 11 - 11
documentation/manual/en/module_specs/Zend_Controller-Plugins-ErrorHandler.xml

@@ -27,7 +27,7 @@
     </itemizedlist>
 
     <para>
-        In other words, the <code>ErrorHandler</code> plugin is designed to
+        In other words, the <emphasis>ErrorHandler</emphasis> plugin is designed to
         handle HTTP 404-type errors (page missing) and 500-type errors (internal
         error). It is not intended to catch exceptions raised in other plugins
         or routing.
@@ -35,7 +35,7 @@
 
     <para>
         By default, <classname>Zend_Controller_Plugin_ErrorHandler</classname> will
-        forward to <code>ErrorController::errorAction()</code> in the default
+        forward to <methodname>ErrorController::errorAction()</methodname> in the default
         module. You may set alternate values for these by using the various
         accessors available to the plugin:
     </para>
@@ -43,28 +43,28 @@
     <itemizedlist>
         <listitem>
             <para>
-                <code>setErrorHandlerModule()</code> sets the controller module
+                <methodname>setErrorHandlerModule()</methodname> sets the controller module
                 to use.
             </para>
         </listitem>
 
         <listitem>
             <para>
-                <code>setErrorHandlerController()</code> sets the controller
+                <methodname>setErrorHandlerController()</methodname> sets the controller
                 to use.
             </para>
         </listitem>
 
         <listitem>
             <para>
-                <code>setErrorHandlerAction()</code> sets the controller action
+                <methodname>setErrorHandlerAction()</methodname> sets the controller action
                 to use.
             </para>
         </listitem>
 
         <listitem>
             <para>
-                <code>setErrorHandler()</code> takes an associative array, which
+                <methodname>setErrorHandler()</methodname> takes an associative array, which
                 may contain any of the keys 'module', 'controller', or 'action',
                 with which it will set the appropriate values.
             </para>
@@ -73,12 +73,12 @@
 
     <para>
         Additionally, you may pass an optional associative array to the
-        constructor, which will then proxy to <code>setErrorHandler()</code>.
+        constructor, which will then proxy to <methodname>setErrorHandler()</methodname>.
     </para>
 
     <para>
         <classname>Zend_Controller_Plugin_ErrorHandler</classname> registers a
-        <code>postDispatch()</code> hook and checks for exceptions registered in
+        <methodname>postDispatch()</methodname> hook and checks for exceptions registered in
         <link linkend="zend.controller.response">the response object</link>. If
         any are found, it attempts to forward to the registered error handler
         action.
@@ -94,7 +94,7 @@
         <title>Using the ErrorHandler as a 404 Handler</title>
 
         <para>
-            Since the <code>ErrorHandler</code> plugin captures not only
+            Since the <emphasis>ErrorHandler</emphasis> plugin captures not only
             application errors, but also errors in the controller chain arising
             from missing controller classes and/or action methods, it can be
             used as a 404 handler. To do so, you will need to have your error
@@ -119,7 +119,7 @@ class ErrorController extends Zend_Controller_Action
 
         <para>
             Once you have the error object, you can get the type via
-            <code>$errors->type</code>. It will be one of the following:
+            <varname>$errors->type</varname>. It will be one of the following:
         </para>
 
         <itemizedlist>
@@ -221,7 +221,7 @@ public function errorAction()
 
         <para>
             If you dispatch multiple actions in a request, or if your action
-            makes multiple calls to <code>render()</code>, it's possible that the
+            makes multiple calls to <methodname>render()</methodname>, it's possible that the
             response object already has content stored within it. This can lead
             to rendering a mixture of expected content and error content.
         </para>

+ 11 - 11
documentation/manual/en/module_specs/Zend_Controller-Plugins.xml

@@ -24,7 +24,7 @@
         <itemizedlist>
             <listitem>
                 <para>
-                    <code>routeStartup()</code> is called before
+                    <methodname>routeStartup()</methodname> is called before
                     <classname>Zend_Controller_Front</classname> calls on <link
                         linkend="zend.controller.router">the router</link>
                     to evaluate the request against the registered routes.
@@ -33,7 +33,7 @@
 
             <listitem>
                 <para>
-                    <code>routeShutdown()</code> is called after <link
+                    <methodname>routeShutdown()</methodname> is called after <link
                         linkend="zend.controller.router">the router</link>
                     finishes routing the request.
                 </para>
@@ -41,14 +41,14 @@
 
             <listitem>
                 <para>
-                    <code>dispatchLoopStartup()</code> is called before
+                    <methodname>dispatchLoopStartup()</methodname> is called before
                     <classname>Zend_Controller_Front</classname> enters its dispatch loop.
                 </para>
             </listitem>
 
             <listitem>
                 <para>
-                    <code>preDispatch()</code> is called before an action is
+                    <methodname>preDispatch()</methodname> is called before an action is
                     dispatched by <link linkend="zend.controller.dispatcher">the
                         dispatcher</link>. This callback allows for proxy or
                     filter behavior. By altering the request and resetting its
@@ -60,7 +60,7 @@
 
             <listitem>
                 <para>
-                    <code>postDispatch()</code> is called after an action is
+                    <methodname>postDispatch()</methodname> is called after an action is
                     dispatched by <link linkend="zend.controller.dispatcher">the
                         dispatcher</link>. This callback allows for proxy or
                     filter behavior. By altering the request and resetting its
@@ -72,7 +72,7 @@
 
             <listitem>
                 <para>
-                    <code>dispatchLoopShutdown()</code> is called after
+                    <methodname>dispatchLoopShutdown()</methodname> is called after
                     <classname>Zend_Controller_Front</classname> exits its dispatch loop.
                 </para>
             </listitem>
@@ -105,8 +105,8 @@ class MyPlugin extends Zend_Controller_Plugin_Abstract
         <para>
             <classname>Zend_Controller_Plugin_Abstract</classname> also makes the request
             and response objects available to controller plugins via the
-            <code>getRequest()</code> and <code>getResponse()</code> methods,
-            respectively.
+            <methodname>getRequest()</methodname> and <methodname>getResponse()</methodname>
+            methods, respectively.
         </para>
     </sect2>
 
@@ -203,18 +203,18 @@ $front->dispatch();
 
         <itemizedlist>
             <listitem><para>
-                    <code>getPlugin($class)</code> allows you to retrieve a
+                    <methodname>getPlugin($class)</methodname> allows you to retrieve a
                     plugin by class name. If no plugins match, it returns false.
                     If more than one plugin of that class is registered, it
                     returns an array.
             </para></listitem>
 
             <listitem><para>
-                    <code>getPlugins()</code> retrieves the entire plugin stack.
+                    <methodname>getPlugins()</methodname> retrieves the entire plugin stack.
             </para></listitem>
 
             <listitem><para>
-                    <code>unregisterPlugin($plugin)</code> allows you to remove
+                    <methodname>unregisterPlugin($plugin)</methodname> allows you to remove
                     a plugin from the stack. You may pass a plugin object, or
                     the class name of the plugin you wish to unregister. If you
                     pass the class name, any plugins of that class will be

+ 29 - 23
documentation/manual/en/module_specs/Zend_Controller-QuickStart.xml

@@ -74,7 +74,7 @@ html/
             <title>Create the Rewrite Rules</title>
 
             <para>
-                Edit the <code>html/.htaccess</code> file above to read as
+                Edit the <filename>html/.htaccess</filename> file above to read as
                 follows:
             </para>
 
@@ -155,8 +155,8 @@ RewriteRule ^.*$ index.php [NC,L]
 
             <para>
                 The bootstrap file is the page all requests are routed through
-                -- <code>html/index.php</code> in this case. Open up
-                <code>html/index.php</code> in the editor of your choice and add
+                -- <filename>html/index.php</filename> in this case. Open up
+                <filename>html/index.php</filename> in the editor of your choice and add
                 the following:
             </para>
 
@@ -178,8 +178,8 @@ Zend_Controller_Front::run('/path/to/app/controllers');
                 understand how requests are routed in Zend Framework. By
                 default, the first segment of a URL path maps to a controller,
                 and the second to an action. For example, given the URL
-                <code>http://framework.zend.com/roadmap/components</code>, the
-                path is <code>/roadmap/components</code>, which will map to the
+                <filename>http://framework.zend.com/roadmap/components</filename>, the
+                path is <filename>/roadmap/components</filename>, which will map to the
                 controller <code>roadmap</code> and the action
                 <code>components</code>. If no action is provided, the action
                 <code>index</code> is assumed, and if no controller is provided,
@@ -203,14 +203,14 @@ Zend_Controller_Front::run('/path/to/app/controllers');
                 word <code>Action</code> is appended. Thus, in our example
                 above, the action <code>components</code> becomes
                 <code>componentsAction</code>, and the final method called is
-                <code>RoadmapController::componentsAction()</code>.
+                <methodname>RoadmapController::componentsAction()</methodname>.
             </para>
 
             <para>
                 So, moving on, let's now create a default action controller and
                 action method. As noted earlier, the default controller and
                 action called are both <code>index</code>. Open the file
-                <code>application/controllers/IndexController.php</code>, and
+                <filename>application/controllers/IndexController.php</filename>, and
                 enter the following:
             </para>
 
@@ -231,19 +231,19 @@ class IndexController extends Zend_Controller_Action
                 defining an action method and a corresponding view script, you
                 will immediately get content rendered. By default,
                 <classname>Zend_View</classname> is used as the View layer in the MVC. The
-                <code>ViewRenderer</code> does some magic, and uses the
+                <emphasis>ViewRenderer</emphasis> does some magic, and uses the
                 controller name (e.g., <code>index</code>) and the current
                 action name (e.g., <code>index</code>) to determine what
                 template to pull. By default, templates end in the
-                <code>.phtml</code> extension, so this means that, in the above
-                example, the template <code>index/index.phtml</code> will be
-                rendered. Additionally, the <code>ViewRenderer</code>
+                <filename>.phtml</filename> extension, so this means that, in the above
+                example, the template <filename>index/index.phtml</filename> will be
+                rendered. Additionally, the <emphasis>ViewRenderer</emphasis>
                 automatically assumes that the directory <code>views</code> at
                 the same level as the controller directory will be the base view
                 directory, and that the actual view scripts will be in the
-                <code>views/scripts/</code> subdirectory. Thus, the template
+                <filename>views/scripts/</filename> subdirectory. Thus, the template
                 rendered will be found in
-                <code>application/views/scripts/index/index.phtml</code>.
+                <filename>application/views/scripts/index/index.phtml</filename>.
             </para>
         </sect3>
 
@@ -254,9 +254,9 @@ class IndexController extends Zend_Controller_Action
                 As mentioned <link
                     linkend="zend.controller.quickstart.go.controller">in the
                     previous section</link>, view scripts are found in
-                <code>application/views/scripts/</code>; the view script for the
+                <filename>application/views/scripts/</filename>; the view script for the
                 default controller and action is in
-                <code>application/views/scripts/index/index.phtml</code>. Create
+                <filename>application/views/scripts/index/index.phtml</filename>. Create
                 this file, and type in some HTML:
             </para>
 
@@ -284,8 +284,8 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                     linkend="zend.controller.plugins.standard.errorhandler">the
                 error handler plugin</link> is registered. This plugin expects
                 that a controller exists to handle errors. By default, it
-                assumes an <code>ErrorController</code> in the default module
-                with an <code>errorAction</code> method:
+                assumes an <emphasis>ErrorController</emphasis> in the default module
+                with an <methodname>errorAction()</methodname> method:
             </para>
 
             <programlisting language="php"><![CDATA[
@@ -299,9 +299,9 @@ class ErrorController extends Zend_Controller_Action
 
             <para>
                 Assuming the already discussed directory layout, this file will
-                go in <code>application/controllers/ErrorController.php</code>.
+                go in <filename>application/controllers/ErrorController.php</filename>.
                 You will also need to create a view script in
-                <code>application/views/scripts/error/error.phtml</code>; sample
+                <filename>application/views/scripts/error/error.phtml</filename>; sample
                 content might look like:
             </para>
 
@@ -328,14 +328,20 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
             <para>
                 With your first controller and view under your belt, you can now
                 fire up your browser and browse to the site. Assuming
-                <code>example.com</code> is your domain, any of the following
+                <filename>example.com</filename> is your domain, any of the following
                 URLs will get to the page we've just created:
             </para>
 
             <itemizedlist>
-                <listitem><para><code>http://example.com/</code></para></listitem>
-                <listitem><para><code>http://example.com/index</code></para></listitem>
-                <listitem><para><code>http://example.com/index/index</code></para></listitem>
+                <listitem>
+                    <para><filename>http://example.com/</filename></para>
+                </listitem>
+                <listitem>
+                    <para><filename>http://example.com/index</filename></para>
+                </listitem>
+                <listitem>
+                    <para><filename>http://example.com/index/index</filename></para>
+                </listitem>
             </itemizedlist>
 
             <para>

+ 36 - 36
documentation/manual/en/module_specs/Zend_Controller-Request.xml

@@ -15,27 +15,27 @@
         <itemizedlist>
             <listitem><para>
                 The module name is accessed by
-                <code>getModuleName()</code> and
-                <code>setModuleName()</code>.
+                <methodname>getModuleName()</methodname> and
+                <methodname>setModuleName()</methodname>.
             </para></listitem>
 
             <listitem><para>
                 The controller name is accessed by
-                <code>getControllerName()</code> and
-                <code>setControllerName()</code>.
+                <methodname>getControllerName()</methodname> and
+                <methodname>setControllerName()</methodname>.
             </para></listitem>
 
             <listitem><para>
                 The name of the action to call within that controller is
-                accessed by <code>getActionName()</code> and
-                <code>setActionName()</code>.
+                accessed by <methodname>getActionName()</methodname> and
+                <methodname>setActionName()</methodname>.
             </para></listitem>
 
             <listitem><para>
                 Parameters to be accessible by the action are an associative array
-                of key/value pairs that are retrieved by <code>getParams()</code>
-                and set with <code>setParams()</code>, or individually by
-                <code>getParam()</code> and <code>setParam()</code>.
+                of key/value pairs that are retrieved by <methodname>getParams()</methodname>
+                and set with <methodname>setParams()</methodname>, or individually by
+                <methodname>getParam()</methodname> and <methodname>setParam()</methodname>.
             </para></listitem>
         </itemizedlist>
 
@@ -98,9 +98,9 @@
                 Specific superglobals can be accessed using a public method as
                 an alternative. For example, the raw value of
                 <varname>$_POST['user']</varname> can be accessed by calling
-                <code>getPost('user')</code> on the request object. These
-                include <code>getQuery()</code> for retrieving
-                <varname>$_GET</varname> elements, and <code>getHeader()</code> for
+                <methodname>getPost('user')</methodname> on the request object. These
+                include <methodname>getQuery()</methodname> for retrieving
+                <varname>$_GET</varname> elements, and <methodname>getHeader()</methodname> for
                 retrieving request headers.
             </para>
 
@@ -119,7 +119,7 @@
 
                 <para>
                     As of 1.5.0, you can also retrieve the raw post data via the
-                    <code>getRawBody()</code> method. This method returns false
+                    <methodname>getRawBody()</methodname> method. This method returns false
                     if no data was submitted in that fashion, but the full body
                     of the post otherwise.
                 </para>
@@ -132,8 +132,8 @@
 
             <para>
                 You may also set user parameters in the request object using
-                <code>setParam()</code> and retrieve these later using
-                <code>getParam()</code>. The router makes use of this
+                <methodname>setParam()</methodname> and retrieve these later using
+                <methodname>getParam()</methodname>. The router makes use of this
                 functionality to set parameters matched in the request URI into
                 the request object.
             </para>
@@ -142,9 +142,9 @@
                 <title>getParam() Retrieves More than User Parameters</title>
 
                 <para>
-                    In order to do some of its work, <code>getParam()</code> actually
+                    In order to do some of its work, <methodname>getParam()</methodname> actually
                     retrieves from several sources. In order of priority, these
-                    include: user parameters set via <code>setParam()</code>,
+                    include: user parameters set via <methodname>setParam()</methodname>,
                     <code>GET</code> parameters, and finally <code>POST</code>
                     parameters. Be aware of this when pulling data via this
                     method.
@@ -152,17 +152,17 @@
 
                 <para>
                     If you wish to pull only from parameters you set via
-                    <code>setParam()</code>, use the <code>getUserParam()</code>.
+                    <methodname>setParam()</methodname>, use the <methodname>getUserParam()</methodname>.
                 </para>
 
                 <para>
                     Additionally, as of 1.5.0, you can lock down which parameter
-                    sources will be searched. <code>setParamSources()</code>
+                    sources will be searched. <methodname>setParamSources()</methodname>
                     allows you to specify an empty array or an array with one or
                     more of the values '_GET' or '_POST' indicating which
                     parameter sources are allowed (by default, both are
                     allowed); if you wish to restrict access to only '_GET'
-                    specify <code>setParamSources(array('_GET'))</code>.
+                    specify <methodname>setParamSources(array('_GET'))</methodname>.
                 </para>
             </note>
 
@@ -204,16 +204,16 @@ $front->setRequest($request);
             </para>
 
             <para>
-                For example, if you keep your <code>index.php</code> in a
+                For example, if you keep your <filename>index.php</filename> in a
                 webserver subdirectory named
-                <code>/projects/myapp/index.php</code>, base URL (rewrite base)
-                should be set to <code>/projects/myapp</code>. This string will
+                <filename>/projects/myapp/index.php</filename>, base URL (rewrite base)
+                should be set to <filename>/projects/myapp</filename>. This string will
                 then be stripped from the beginning of the path before
                 calculating any route matches. This frees one from the necessity
                 of prepending it to any of your routes. A route of
-                <code>'user/:username'</code> will match URIs like
-                <code>http://localhost/projects/myapp/user/martel</code> and
-                <code>http://example.com/user/martel</code>.
+                <filename>'user/:username'</filename> will match URIs like
+                <filename>http://localhost/projects/myapp/user/martel</filename> and
+                <filename>http://example.com/user/martel</filename>.
             </para>
 
             <note>
@@ -228,7 +228,7 @@ $front->setRequest($request);
             <para>
                 Should base URL be detected incorrectly you can override it
                 with your own base path with the help of the
-                <code>setBaseUrl()</code> method of either the
+                <methodname>setBaseUrl()</methodname> method of either the
                 <classname>Zend_Controller_Request_Http</classname> class, or the
                 <classname>Zend_Controller_Front</classname> class. The easiest
                 method is to set it in <classname>Zend_Controller_Front</classname>,
@@ -254,7 +254,7 @@ $response   = $controller->dispatch();
             <title>Determining the Request Method</title>
 
             <para>
-                <code>getMethod()</code> allows you to determine the HTTP
+                <methodname>getMethod()</methodname> allows you to determine the HTTP
                 request method used to request the current resource.
                 Additionally, a variety of methods exist that allow you to get
                 boolean responses when asking if a specific type of request has
@@ -262,12 +262,12 @@ $response   = $controller->dispatch();
             </para>
 
             <itemizedlist>
-                <listitem><para><code>isGet()</code></para></listitem>
-                <listitem><para><code>isPost()</code></para></listitem>
-                <listitem><para><code>isPut()</code></para></listitem>
-                <listitem><para><code>isDelete()</code></para></listitem>
-                <listitem><para><code>isHead()</code></para></listitem>
-                <listitem><para><code>isOptions()</code></para></listitem>
+                <listitem><para><methodname>isGet()</methodname></para></listitem>
+                <listitem><para><methodname>isPost()</methodname></para></listitem>
+                <listitem><para><methodname>isPut()</methodname></para></listitem>
+                <listitem><para><methodname>isDelete()</methodname></para></listitem>
+                <listitem><para><methodname>isHead()</methodname></para></listitem>
+                <listitem><para><methodname>isOptions()</methodname></para></listitem>
             </itemizedlist>
 
             <para>
@@ -282,7 +282,7 @@ $response   = $controller->dispatch();
             <para>
                 <classname>Zend_Controller_Request_Http</classname> has a rudimentary
                 method for detecting AJAX requests:
-                <code>isXmlHttpRequest()</code>. This method looks for an
+                <methodname>isXmlHttpRequest()</methodname>. This method looks for an
                 HTTP request header <code>X-Requested-With</code> with the value
                 'XMLHttpRequest'; if found, it returns true.
             </para>
@@ -304,7 +304,7 @@ $response   = $controller->dispatch();
                 Most AJAX libraries allow you to send custom HTTP request
                 headers; if your library does not send this header, simply add
                 it as a request header to ensure the
-                <code>isXmlHttpRequest()</code> method works for you.
+                <methodname>isXmlHttpRequest()</methodname> method works for you.
             </para>
         </sect3>
     </sect2>