コード例 #1
0
 /**
  *    Breaks the request down into an object.
  *    @param string $raw           Raw request.
  *    @return SimpleFormEncoding    Parsed data.
  *    @access private
  */
 protected function parseRequest($raw)
 {
     $this->raw = $raw;
     $request = new SimpleGetEncoding();
     foreach (explode("&", $raw) as $pair) {
         if (preg_match('/(.*?)=(.*)/', $pair, $matches)) {
             $request->add(urldecode($matches[1]), urldecode($matches[2]));
         } elseif ($pair) {
             $request->add(urldecode($pair), '');
         }
     }
     return $request;
 }
コード例 #2
0
ファイル: url.php プロジェクト: automatweb/automatweb_sales
 /**
  *    Breaks the request down into an object.
  *    @param string $raw           Raw request.
  *    @return SimpleFormEncoding    Parsed data.
  *    @access private
  */
 function _parseRequest($raw)
 {
     $this->_raw = $raw;
     $request = new SimpleGetEncoding();
     foreach (split("&", $raw) as $pair) {
         if (preg_match('/(.*?)=(.*)/', $pair, $matches)) {
             $request->add($matches[1], urldecode($matches[2]));
         } elseif ($pair) {
             $request->add($pair, '');
         }
     }
     return $request;
 }