Example #1
0
 /**
  * Initialize this web request.
  * 
  * @return 
  */
 public function __construct()
 {
     parent::__construct();
     if (isset($_SERVER['REQUEST_METHOD'])) {
         switch ($_SERVER['REQUEST_METHOD']) {
             case 'GET':
                 $this->setMethod(self::GET);
                 break;
             case 'POST':
                 $this->setMethod(self::POST);
                 break;
             default:
                 $this->setMethod(self::GET);
         }
     } else {
         // set the default method
         $this->setMethod(self::GET);
     }
     // GET parameters
     $this->getParameters = get_magic_quotes_gpc() ? coreToolkit::stripslashesDeep($_GET) : $_GET;
     $this->parameterHolder->add($this->getParameters);
     // POST parameters
     $this->postParameters = get_magic_quotes_gpc() ? coreToolkit::stripslashesDeep($_POST) : $_POST;
     $this->parameterHolder->add($this->postParameters);
 }