Commands
[ class tree: Commands ] [ index: Commands ] [ all elements ]

Source for file BrowserInfoCommand.php

Documentation is available at BrowserInfoCommand.php

  1. <?php
  2. /**
  3.  * MVClasses
  4.  *
  5.  * LICENSE
  6.  *
  7.  * "THE BEER-WARE LICENSE" (Revision 42):
  8.  * "Sven Strittmatter" <ausserirdisch@sven-space.de> wrote this file.
  9.  * As long as you retain this notice you can do whatever you want with
  10.  * this stuff. If we meet some day, and you think this stuff is worth it,
  11.  * you can buy me a beer in return.
  12.  *
  13.  * @category    MVClasses
  14.  * @package     Commands
  15.  * @copyright   Copyright (c) 2007 Sven Strittmatter
  16.  */
  17.  
  18.  /**
  19.   * @see Command
  20.   */
  21. require_once dirname(__FILE__)."/Command.php";
  22.  
  23. /**
  24.  * Ermittelt den User-Agent und gibt ihn aus.
  25.  *
  26.  * Dieses Comamnd ermittelt anhand des Request-Objektes
  27.  * den User-Agent von welchem der Request kommt und gibt
  28.  * dieses ueber Response-Objekt aus.
  29.  *
  30.  * @category    MVClasses
  31.  * @package     Commands
  32.  * @copyright     Copyright (c) 2007 Sven Strittmatter
  33.  * @author    "Sven Strittmatter" <ausserirdisch@sven-space.de>
  34.  * @version     1.0
  35.  * @link    http://www.sven-space.de/code/php/MVClasses
  36.  */
  37. class BrowserInfoCommand implements Command {
  38.     /**
  39.      * Fuehrt das Command aus.
  40.      *
  41.      * @access     public
  42.      * @param    Request $req 
  43.      * @param    Response $res 
  44.      */
  45.     public function execute(Request $reqResponse $res{
  46.         $view new TemplateView(dirname(__FILE__)."/../Views/BrowserInfo.php");
  47.         $view->assign("browser"$req->getHeader(HttpRequest::HTTP_HEADER_USER_AGENT));
  48.         $view->render($req$res);
  49.     }
  50. }

Documentation generated on Sun, 02 Aug 2009 17:14:51 +0200 by phpDocumentor 1.4.2