Author: jpic
Date: Thu Feb 21 14:49:20 2008
New Revision: 7422

Log:
- Input object should be accessible to the view-manager. Idea by Kore.

Modified:
    experimental/MvcTools/design/design.txt

Modified: experimental/MvcTools/design/design.txt
==============================================================================
--- experimental/MvcTools/design/design.txt [iso-8859-1] (original)
+++ experimental/MvcTools/design/design.txt [iso-8859-1] Thu Feb 21 14:49:20 
2008
@@ -121,11 +121,6 @@
    */
   ? public function getControllers()
 
-  /**
-   * Returns the view-manager.
-   */
-  ezcMvcViewManager public function getViewManager()
-
 ezcMvcViewManager
 -----------------
 
@@ -144,21 +139,21 @@
    *                                  wrapping them ?
    * @see Encapsulate controller multiplicity ?
    */
-  void public function handle( ? $controllers )
+  void public function handle( $input, ? $controllers )
 
   /**
    * Create and return the response string.
    *
    * Returns a string or an ezcMvcResponseBody ?
    */
-  ? public function createResponseBody( ? $controllers )
+  ? public function createResponseBody( $input, ? $controllers )
 
   /**
    * Create and return the response header variables.
    *
    * Return an array of key=>values or an ezcMvcResponseHeaders ?
    */
-  ? public function createResponseHeader( ? $controllers )
+  ? public function createResponseHeader( $input, ? $controllers )
 
 ezcMvcViewHandler
 -----------------
@@ -228,10 +223,10 @@
     $controllers = $router->getControllers();
 
     // For example, an instance of ezcMvcTemplateHtmlViewManager
-    $viewManager = $router->getViewManager();
+    $viewManager = new ezcMvcTemplateHtmlViewManager();
 
     // Takes care of running the controllers and rendering their results
-    $viewManager->handle( $controllers );
+    $viewManager->handle( $input, $controllers );
 
 Attempt of representing a common use case, assuming classic HTML over HTTP :
 
@@ -240,8 +235,7 @@
    widget[action]=add&widget[id]=3&menu[selected]=widget
 1) $router can be used to fetch a set of controllers : myMvcWidgetController
    and myDynamicMenuController.
-2) $router can be used to fetch the view-manager :
-   ezcMvcTemplateHtmlViewManager.
+2) Instanciate an ezcMvcTemplateHtmlViewManager.
 3) The view manager runs both controllers, and processes two templates using
    the controllers resulting output object along with
    ezcMvcTemplateHtmlViewHandler : menu.tpl, widget.tpl


-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to