AJAX
[ class tree: AJAX ] [ index: AJAX ] [ all elements ]

Source for file Urlencoded.php

Documentation is available at Urlencoded.php

  1. <?php
  2. // $Id$
  3. /**
  4.  * URL Encoding Serializer
  5.  *
  6.  * @category   HTML
  7.  * @package    AJAX
  8.  * @author     Arpad Ray <arpad@php.net>
  9.  * @copyright  2005 Arpad Ray
  10.  * @license    http://www.opensource.org/licenses/lgpl-license.php  LGPL
  11.  * @version    Release: @package_version@
  12.  * @link       http://pear.php.net/package/HTML_AJAX
  13.  */
  14. {
  15.     function serialize($input
  16.     {
  17.         if (!function_exists('http_build_query')) {
  18.             @include_once 'PHP/Compat/Function/http_build_query.php';
  19.             if (!function_exists('http_build_query')) {
  20.                 trigger_error('The URL encoding serializer requires http_build_query(), for information about using this function without upgrading your version of PHP, see: <a href="http://pear.php.net/package/PHP_Compat">http://pear.php.net/package/PHP_Compat</a>'E_USER_WARNING);
  21.                 return;
  22.             }
  23.         }
  24.         return http_build_query(array('_HTML_AJAX' => $input));
  25.         //return http_build_query($input);
  26.     }
  27.  
  28.     function unserialize($input
  29.     {
  30.         parse_str($input$ret);
  31.         return (isset($ret['_HTML_AJAX']$ret['_HTML_AJAX'$ret);
  32.     }
  33. }
  34. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
  35. ?>

Documentation generated on Mon, 11 Mar 2019 14:04:03 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.