Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jan 18th, 2012  |  syntax: PHP  |  size: 1.40 KB  |  hits: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. namespace RD\TEST\Command;
  3.  
  4. /*                                                                        *
  5.  * This script belongs to the FLOW3 package "RD.TEST".                    *
  6.  *                                                                        *
  7.  *                                                                        */
  8.  
  9. use TYPO3\FLOW3\Annotations as FLOW3;
  10.  
  11. /**
  12.  * Test command controller for the RD.TEST package
  13.  *
  14.  * @FLOW3\Scope("singleton")
  15.  */
  16. class TestCommandController extends \TYPO3\FLOW3\MVC\Controller\CommandController {
  17.  
  18.  
  19.   /**
  20.    * @FLOW3\Inject
  21.    * @var \TYPO3\FLOW3\Session\PhpSession
  22.    */
  23.   protected $currentSession;
  24.  
  25.         /**
  26.          * An example command
  27.          *
  28.          * The comment of this command method is also used for FLOW3's help screens. The first line should give a very short
  29.          * summary about what the command does. Then, after an empty line, you should explain in more detail what the command
  30.          * does. You might also give some usage example.
  31.          *
  32.          * It is important to document the parameters with param tags, because that information will also appear in the help
  33.          * screen.
  34.          *
  35.          * @param string $optionalArgument This argument is optional
  36.          * @return void
  37.          */
  38.         public function exampleCommand($optionalArgument = NULL) {
  39.                 $this->outputLine('You called the example command and class name is "%s".', array(get_class($this->currentSession)));
  40.         }
  41.  
  42. }
  43.  
  44. ?>