Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: OpenID

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5
Source code for file /openid/Services/Yadis/Misc.php

Documentation is available at Misc.php

  1. <?php
  2.  
  3. /**
  4.  * Miscellaneous utility values and functions for OpenID and Yadis.
  5.  *
  6.  * @package OpenID
  7.  * @author JanRain, Inc. <[email protected]>
  8.  * @copyright 2005 Janrain, Inc.
  9.  * @license http://www.gnu.org/copyleft/lesser.html LGPL
  10.  */
  11.  
  12. $__UCSCHAR = array(
  13.                    array(0xA0, 0xD7FF),
  14.                    array(0xF900, 0xFDCF),
  15.                    array(0xFDF0, 0xFFEF),
  16.                    array(0x10000, 0x1FFFD),
  17.                    array(0x20000, 0x2FFFD),
  18.                    array(0x30000, 0x3FFFD),
  19.                    array(0x40000, 0x4FFFD),
  20.                    array(0x50000, 0x5FFFD),
  21.                    array(0x60000, 0x6FFFD),
  22.                    array(0x70000, 0x7FFFD),
  23.                    array(0x80000, 0x8FFFD),
  24.                    array(0x90000, 0x9FFFD),
  25.                    array(0xA0000, 0xAFFFD),
  26.                    array(0xB0000, 0xBFFFD),
  27.                    array(0xC0000, 0xCFFFD),
  28.                    array(0xD0000, 0xDFFFD),
  29.                    array(0xE1000, 0xEFFFD)
  30.                    );
  31.  
  32. $__IPRIVATE = array(
  33.                     array(0xE000, 0xF8FF),
  34.                     array(0xF0000, 0xFFFFD),
  35.                     array(0x100000, 0x10FFFD)
  36.                     );
  37.  
  38. function _pct_escape_unicode($char_match)
  39. {
  40.     $c = $char_match[0];
  41.     $result = "";
  42.     for ($i = 0; $i < strlen($c); $i++) {
  43.         $result .= "%".sprintf("%X", ord($c[$i]));
  44.     }
  45.     return $result;
  46. }
  47.  
  48. function _startswith($s, $stuff)
  49. {
  50.     return strpos($s, $stuff) === 0;
  51. }
  52.  
  53. ?>

Documentation generated on Mon, 05 Mar 2007 21:10:47 +0000 by phpDocumentor 1.3.1