Browse Source

[DOCUMENTATION] English:
- manual fixes

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@16705 44c647ce-9c0f-0410-b52a-842ac1e357ba

mikaelkael 16 years ago
parent
commit
13edb3b5c7

+ 21 - 18
documentation/manual/en/module_specs/Zend_Controller-Modular.xml

@@ -7,7 +7,7 @@
         <title>Introduction</title>
         <para>
             The Conventional Modular directory structure allows you to separate
-            different MVC applications into self-contained units, and re-use
+            different <acronym>MVC</acronym> applications into self-contained units, and re-use
             them with different front controllers. To illustrate such a
             directory structure:
         </para>
@@ -52,9 +52,11 @@ application/
         <para>
             In this paradigm, the module name serves as a prefix to the
             controllers it contains. The above example contains three
-            module controllers, 'Blog_IndexController', 'News_IndexController', and
-            'News_ListController'. Two global controllers, 'IndexController' and
-            'FooController' are also defined; neither of these will be
+            module controllers, '<classname>Blog_IndexController</classname>',
+            '<classname>News_IndexController</classname>', and
+            '<classname>News_ListController</classname>'.
+            Two global controllers, '<classname>IndexController</classname>' and
+            '<classname>FooController</classname>' are also defined; neither of these will be
             namespaced. This directory structure will be used for examples in
             this chapter.
         </para>
@@ -66,14 +68,15 @@ application/
                 namespace prefix. Thus, in the example above, the controllers in
                 the default module do not need a prefix of 'Default_' -- they
                 are simply dispatched according to their base controller name:
-                'IndexController' and 'FooController'. A namespace prefix is
+                '<classname>IndexController</classname>' and
+                '<classname>FooController</classname>'. A namespace prefix is
                 used in all other modules, however.
             </para>
         </note>
 
         <para>
             So, how do you implement such a directory layout using the Zend
-            Framework MVC components?
+            Framework <acronym>MVC</acronym> components?
         </para>
     </sect2>
 
@@ -83,7 +86,7 @@ application/
         <para>
             The first step to making use of modules is to modify how you specify
             the controller directory list in the front controller. In the basic
-            MVC series, you pass either an array or a string to
+            <acronym>MVC</acronym> series, you pass either an array or a string to
             <methodname>setControllerDirectory()</methodname>, or a path to
             <methodname>addControllerDirectory()</methodname>. When using modules, you need
             to alter your calls to these methods slightly.
@@ -91,11 +94,11 @@ application/
 
         <para>
             With <methodname>setControllerDirectory()</methodname>, you will need to pass an
-            associative array and specify key/value pairs of module
-            name/directory paths. The special key <code>default</code> will be
+            associative array and specify key and value pairs of module
+            name and directory paths. The special key <property>default</property> will be
             used for global controllers (those not needing a module namespace).
             All entries should contain a string key pointing to a single path,
-            and the <code>default</code> key must be present. As an example:
+            and the <property>default</property> key must be present. As an example:
         </para>
 
         <programlisting language="php"><![CDATA[
@@ -109,7 +112,7 @@ $front->setControllerDirectory(array(
             <methodname>addControllerDirectory()</methodname> will take an optional second
             argument. When using modules, pass the module name as the second
             argument; if not specified, the path will be added to the
-            <code>default</code> namespace. As an example:
+            <emphasis>default</emphasis> namespace. As an example:
         </para>
 
         <programlisting language="php"><![CDATA[
@@ -140,9 +143,9 @@ $front->addModuleDirectory('/path/to/application/modules');
 ]]></programlisting>
 
         <para>
-            The above example will define the <code>default</code>,
-            <code>foo</code>, and <code>bar</code> modules, each pointing to the
-            <code>controllers</code> subdirectory of their respective module.
+            The above example will define the <emphasis>default</emphasis>,
+            <emphasis>foo</emphasis>, and <emphasis>bar</emphasis> modules, each pointing to the
+            <filename>controllers/</filename> subdirectory of their respective module.
         </para>
 
         <para>
@@ -183,8 +186,8 @@ $front->addModuleDirectory('/path/to/application/modules');
         </para>
 
         <itemizedlist>
-            <listitem><para><code>:module/:controller/:action/*</code></para></listitem>
-            <listitem><para><code>:controller/:action/*</code></para></listitem>
+            <listitem><para><filename>:module/:controller/:action/*</filename></para></listitem>
+            <listitem><para><filename>:controller/:action/*</filename></para></listitem>
         </itemizedlist>
 
         <para>
@@ -200,8 +203,8 @@ $front->addModuleDirectory('/path/to/application/modules');
         <title>Module or Global Default Controller</title>
 
         <para>
-            In the default router, if a controller was not specified in the URL,
-            a default controller is used (<emphasis>IndexController</emphasis>, unless
+            In the default router, if a controller was not specified in the <acronym>URL</acronym>,
+            a default controller is used (<classname>IndexController</classname>, unless
             otherwise requested). With modular controllers, if a module has been
             specified but no controller, the dispatcher first looks for this
             default controller in the module path, and then falls back on the

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

@@ -5,16 +5,16 @@
 
     <para>
         The <emphasis>ActionStack</emphasis> plugin allows you to manage a stack of
-        requests, and operates as a <code>postDispatch</code> plugin. If a
+        requests, and operates as a <emphasis>postDispatch</emphasis> 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
         stack and pulls the topmost item off it and forwards to the action
-        specified in that request. The stack is processed in LIFO order.
+        specified in that request. The stack is processed in <acronym>LIFO</acronym> order.
     </para>
 
     <para>
         You can retrieve the plugin from the front controller at any time using
-        <classname>Zend_Controller_Front::getPlugin('Zend_Controller_Plugin_ActionStack')</classname>.
+        <methodname>Zend_Controller_Front::getPlugin('Zend_Controller_Plugin_ActionStack')</methodname>.
         Once you have the plugin object, there are a variety of mechanisms you
         can use to manipulate it.
     </para>
@@ -33,7 +33,7 @@
                 <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'.
+                '<classname>Zend_Controller_Plugin_ActionStack</classname>'.
         </para></listitem>
 
         <listitem><para>

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

@@ -17,8 +17,7 @@
 
     <itemizedlist>
         <listitem>
-            <para>Intercept exceptions raised due to missing controllers or
-                action methods</para>
+            <para>Intercept exceptions raised due to missing controllers or action methods</para>
         </listitem>
 
         <listitem>
@@ -104,7 +103,7 @@
         <para>
             Exceptions captured are logged in an object registered in the
             request. To retrieve it, use
-            <classname>Zend_Controller_Action::_getParam('error_handler')</classname>:
+            <methodname>Zend_Controller_Action::_getParam('error_handler')</methodname>:
         </para>
 
         <programlisting language="php"><![CDATA[
@@ -119,27 +118,27 @@ class ErrorController extends Zend_Controller_Action
 
         <para>
             Once you have the error object, you can get the type via
-            <varname>$errors->type</varname>. It will be one of the following:
+            <command>$errors->type;</command>. It will be one of the following:
         </para>
 
         <itemizedlist>
             <listitem>
                 <para>
-                    <classname>Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER</classname>,
+                    <constant>Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER</constant>,
                     indicating the controller was not found.
                 </para>
             </listitem>
 
             <listitem>
                 <para>
-                    <classname>Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION</classname>,
+                    <constant>Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION</constant>,
                     indicating the requested action was not found.
                 </para>
             </listitem>
 
             <listitem>
                 <para>
-                    <classname>Zend_Controller_Plugin_ErrorHandler::EXCEPTION_OTHER</classname>,
+                    <constant>Zend_Controller_Plugin_ErrorHandler::EXCEPTION_OTHER</constant>,
                     indicating other exceptions.
                 </para>
             </listitem>
@@ -177,8 +176,8 @@ class ErrorController extends Zend_Controller_Action
 
         <para>
             Finally, you can retrieve the exception that triggered the error
-            handler by grabbing the <code>exception</code> property of the
-            <code>error_handler</code> object:
+            handler by grabbing the <property>exception</property> property of the
+            <emphasis>error_handler</emphasis> object:
         </para>
 
         <programlisting language="php"><![CDATA[

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

@@ -53,7 +53,7 @@
                         dispatcher</link>. This callback allows for proxy or
                     filter behavior. By altering the request and resetting its
                     dispatched flag (via
-                    <classname>Zend_Controller_Request_Abstract::setDispatched(false)</classname>),
+                    <methodname>Zend_Controller_Request_Abstract::setDispatched(false)</methodname>),
                     the current action may be skipped and/or replaced.
                 </para>
             </listitem>
@@ -65,7 +65,7 @@
                         dispatcher</link>. This callback allows for proxy or
                     filter behavior. By altering the request and resetting its
                     dispatched flag (via
-                    <classname>Zend_Controller_Request_Abstract::setDispatched(false)</classname>),
+                    <methodname>Zend_Controller_Request_Abstract::setDispatched(false)</methodname>),
                     a new action may be specified for dispatching.
                 </para>
             </listitem>
@@ -115,7 +115,7 @@ class MyPlugin extends Zend_Controller_Plugin_Abstract
 
         <para>
             Plugin classes are registered with
-            <classname>Zend_Controller_Front::registerPlugin()</classname>, and may be
+            <methodname>Zend_Controller_Front::registerPlugin()</methodname>, and may be
             registered at any time. The following snippet illustrates how a
             plugin may be used in the controller chain:
         </para>
@@ -204,9 +204,9 @@ $front->dispatch();
         <itemizedlist>
             <listitem><para>
                     <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.
+                    plugin by class name. If no plugins match, it returns
+                    <constant>FALSE</constant>. If more than one plugin of that class
+                    is registered, it returns an array.
             </para></listitem>
 
             <listitem><para>

+ 26 - 25
documentation/manual/en/module_specs/Zend_Controller-QuickStart.xml

@@ -6,8 +6,8 @@
     <sect2 id="zend.controller.quickstart.introduction">
         <title>Introduction</title>
         <para>
-            <classname>Zend_Controller</classname> is the heart of Zend Framework's MVC
-            system. MVC stands for <ulink
+            <classname>Zend_Controller</classname> is the heart of Zend Framework's
+            <acronym>MVC</acronym> system. <acronym>MVC</acronym> stands for <ulink
                 url="http://en.wikipedia.org/wiki/Model-view-controller">Model-View-Controller</ulink>
             and is a design pattern targeted at separating application logic
             from display logic. <classname>Zend_Controller_Front</classname> implements a
@@ -15,7 +15,7 @@
                 url="http://www.martinfowler.com/eaaCatalog/frontController.html">Front
                 Controller</ulink> pattern, in which all requests are
             intercepted by the front controller and dispatched to individual
-            Action Controllers based on the URL requested.
+            Action Controllers based on the <acronym>URL</acronym> requested.
         </para>
         <para>
             The <classname>Zend_Controller</classname> system was built with extensibility
@@ -66,7 +66,7 @@ html/
 
             <para>
                 In your web server, point your document root to the
-                <code>html</code> directory of the above file system layout.
+                <filename>html/</filename> directory of the above file system layout.
             </para>
         </sect3>
 
@@ -102,7 +102,7 @@ RewriteRule ^.*$ index.php [NC,L]
             </note>
 
             <para>
-                If using IIS 7.0, use the following as your rewrite
+                If using <acronym>IIS</acronym> 7.0, use the following as your rewrite
                 configuration:
             </para>
 
@@ -176,15 +176,15 @@ Zend_Controller_Front::run('/path/to/app/controllers');
             <para>
                 Before discussing action controllers, you should first
                 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
+                default, the first segment of a <acronym>URL</acronym> path maps to a controller,
+                and the second to an action. For example, given the <acronym>URL</acronym>
                 <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,
-                the controller <code>index</code> is assumed (following the
-                Apache convention that maps a <code>DirectoryIndex</code>
+                controller <emphasis>roadmap</emphasis> and the action
+                <emphasis>components</emphasis>. If no action is provided, the action
+                <emphasis>index</emphasis> is assumed, and if no controller is provided,
+                the controller <emphasis>index</emphasis> is assumed (following the
+                Apache convention that maps a <emphasis>DirectoryIndex</emphasis>
                 automatically).
             </para>
 
@@ -192,24 +192,24 @@ Zend_Controller_Front::run('/path/to/app/controllers');
                 <classname>Zend_Controller</classname>'s dispatcher then takes the
                 controller value and maps it to a class. By default, it
                 Title-cases the controller name and appends the word
-                <code>Controller</code>. Thus, in our example above, the
-                controller <code>roadmap</code> is mapped to the class
-                <code>RoadmapController</code>.
+                <emphasis>Controller</emphasis>. Thus, in our example above, the
+                controller <emphasis>roadmap</emphasis> is mapped to the class
+                <classname>RoadmapController</classname>.
             </para>
 
             <para>
                 Similarly, the action value is mapped to a method of the
                 controller class. By default, the value is lower-cased, and the
-                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
+                word <emphasis>Action</emphasis> is appended. Thus, in our example
+                above, the action <emphasis>components</emphasis> becomes
+                <methodname>componentsAction()</methodname>, and the final method called is
                 <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
+                action called are both <emphasis>index</emphasis>. Open the file
                 <filename>application/controllers/IndexController.php</filename>, and
                 enter the following:
             </para>
@@ -230,15 +230,16 @@ class IndexController extends Zend_Controller_Action
                 action helper is enabled. What this means is that by simply
                 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
+                <classname>Zend_View</classname> is used as the View layer in the
+                <acronym>MVC</acronym>. 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
+                controller name (e.g., <emphasis>index</emphasis>) and the current
+                action name (e.g., <emphasis>index</emphasis>) to determine what
                 template to pull. By default, templates end in the
                 <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
+                automatically assumes that the directory <filename>views/</filename> at
                 the same level as the controller directory will be the base view
                 directory, and that the actual view scripts will be in the
                 <filename>views/scripts/</filename> subdirectory. Thus, the template
@@ -257,7 +258,7 @@ class IndexController extends Zend_Controller_Action
                 <filename>application/views/scripts/</filename>; the view script for the
                 default controller and action is in
                 <filename>application/views/scripts/index/index.phtml</filename>. Create
-                this file, and type in some HTML:
+                this file, and type in some <acronym>HTML</acronym>:
             </para>
 
             <programlisting language="php"><![CDATA[
@@ -329,7 +330,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                 With your first controller and view under your belt, you can now
                 fire up your browser and browse to the site. Assuming
                 <filename>example.com</filename> is your domain, any of the following
-                URLs will get to the page we've just created:
+                <acronym>URL</acronym>s will get to the page we've just created:
             </para>
 
             <itemizedlist>