Source for file Request.class.php

Documentation is available at Request.class.php

  1. <?php
  2. /**
  3.  * Gumbo Library Framework
  4.  *
  5.  * LICENSE
  6.  * This library is being released under the terms of the New BSD License.  A
  7.  * copy of the license is packaged with the software (LICENSE.txt).  If no
  8.  * copy is found, a copy of the license template can be found at:
  9.  * http://www.opensource.org/licenses/bsd-license.php
  10.  * 
  11.  * @category Gumbo
  12.  * @package Http
  13.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  14.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  15.  * @author Michael Luster <mluster79@yahoo.com>
  16.  * @link http://sourceforge.net/projects/phpgumbo
  17.  * @version 0.0.1
  18.  */
  19.  
  20. /**
  21.  * HTTP Request Interface
  22.  *
  23.  * @category Gumbo
  24.  * @package Http
  25.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  26.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  27.  * @author Michael Luster <mluster79@yahoo.com>
  28.  * @link http://sourceforge.net/projects/phpgumbo
  29.  * @desc HTTP Request Interface
  30.  * @version 0.0.1
  31.  */
  32.  
  33.     
  34.     /** OVERLOAD METHODS **/
  35.     /**
  36.      * Returns the value of the $_REQUEST field based on the mode
  37.      * @param string $fld 
  38.      * @return mixed 
  39.      */
  40.     public function __get ($fld);
  41.     
  42.     /**
  43.      * Returns if the field exists in the REQUEST array
  44.      * @param string $fld 
  45.      * @return mixed 
  46.      */
  47.     public function __isset ($fld);
  48.     
  49.     
  50.     
  51.     /** ACTION METHODS **/
  52.     /**
  53.      * Validates the $_REQUEST variable Input Constraints (if null, validates all)
  54.      * @param string $field 
  55.      */
  56.     public function validate ($field=null);
  57.     
  58.     
  59.     
  60.     /** MUTATOR METHODS **/
  61.     /**
  62.      * Sets the default return mode (request|cookie|post|get)
  63.      * @param string $mode 
  64.      */
  65.     public function setMode ($mode);
  66.     
  67.     
  68.     
  69.     /** ACCESSOR METHODS **/
  70.     /**
  71.      * Returns the value of the $_REQUEST field
  72.      * @param string $field 
  73.      * @param string $mode 
  74.      * @return mixed 
  75.      */
  76.     public function get ($field$mode=null);
  77.     
  78.     /**
  79.      * Returns an array map of User Input
  80.      * @param bool $reload reloads the map
  81.      * @return array 
  82.      */
  83.     public function getMap ($reload=false);
  84.     
  85.     /**
  86.      * Returns the HTTP request method
  87.      * @return string 
  88.      */
  89.     public function getMethod ();
  90.     
  91.     /**
  92.      * Returns the mode return values will be retrieved from
  93.      * @return string 
  94.      */
  95.     public function getMode ();
  96.     
  97. }
  98.  
  99. ?>