[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/action/ -> actioninfo.class.php (source)

   1  <?php
   2  
   3      /**
   4       * \ingroup Action
   5       *
   6       * This class carries some information that classes extending the Action class might need, such as
   7       * with which parameter they were called or which was the name of the parameter
   8       * in the request. 
   9       */
  10      class ActionInfo  
  11      {
  12      
  13          var $_actionParamName; 
  14          var $_actionParamValue;    
  15  
  16          /**
  17           * Constructor.
  18           *
  19           * In the following request:
  20           * <i>controller.php/?action=ViewArticle&articleId=7</i>
  21           * the parameter name would be <i>'action'</i> and the action name would
  22           * be <i>'ViewArticle'</i>. The default name for the parameter name is
  23           * 'action' but it can be changed when constructing the controller. The name
  24           * of the action is specified by using the action maps when creating the controller.
  25           *
  26           * @param actionParamName The name of the parameter that was used to trigger
  27           * the action.
  28           * @param actionParamValue The value of the action parameter that triggered this
  29           * action.
  30           */
  31  		function ActionInfo( $actionParamName, $actionParamValue )
  32          {        
  33              $this->_actionParamName  = $actionParamName;
  34              $this->_actionParamValue = $actionParamValue;
  35          }
  36  
  37          /**
  38           * Returns the name of the parameter used to trigger this action.
  39           *
  40           * @return The name of the parameter.
  41           */
  42          function getActionParamName()
  43          {
  44              return $this->_actionParamName;
  45          }
  46  
  47          /**
  48           * Returns the vlaue of the parameter that triggered this action.
  49           *
  50           * @return The value of the parameter.
  51           */
  52          function getActionParamValue()
  53          {
  54              return $this->_actionParamValue;
  55          }
  56      }
  57  ?>


Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics