[commits] [Wiki] changed: Doc/Dev/Horde_Controller

Jan Schneider jan at horde.org
Tue Aug 6 22:50:56 UTC 2013


jan  Tue, 06 Aug 2013 22:50:56 +0000

Modified page: http://wiki.horde.org/Doc/Dev/Horde_Controller
New Revision:  2
Change log:  Style

@@ -1,5 +1,5 @@
-[toc]]
+[[toc]]

  + Horde_Controller

  Documentation on using Horde_Controller
@@ -7,18 +7,16 @@
  ++ General Info

  ++ Horde_Controllers in Horde Core Apps

-Horde Controllers are independent from the Horde Ajax Framework.
-Controllers need Horde_Routes and need rewrite rules.
+Horde Controllers are independent from the Horde Ajax Framework.  
Controllers need Horde_Routes and need rewrite rules.

-Ajax application controllers do not live in lib but in
-$app/app/controllers/
+Ajax application controllers do not live in {{lib/}} but in  
{{$app/app/controllers/}}

  Example:

-class Nag_CompleteTask_Controller in nag/app/controllers/CompleteTask.php
-<code>
+Class {{Nag_CompleteTask_Controller}} in  
{{nag/app/controllers/!CompleteTask.php}}
+<code type="php">
  <?php
  class Nag_CompleteTask_Controller extends Horde_Controller_Base
  {
      public function processRequest(Horde_Controller_Request  
$request, Horde_Controller_Response $response)
@@ -46,13 +44,12 @@
  ?>
  </code>


-
-A Horde Controller based app needs a config/routes.php file.
+A Horde Controller based app needs a {{config/routes.php}} file.

  For example
-<code>
+<code type="php">
  <?php
  /**
   * Setup default routes
   */
@@ -62,9 +59,9 @@
      ));
  ?>
  </code>

-defines a route for a call like www.myhorde.de/nag/t/complete to be  
handled by the CompleteTask controller seen above.
+defines a route for a call like www.example.com/nag/t/complete to be  
handled by the !CompleteTask controller seen above.

  The endpoint script is horde/rampage.php  - rampage.php currently  
seems to handle only authenticated calls.

  The controller is passed the request (in this case, a json request)  
and handles it (with a json answer in this case)



More information about the commits mailing list