示例#1
0
 /**
  * Unescape
  *
  * @param string $str
  * @return string
  */
 public function unescape($str)
 {
     $escaped = OauthHelper::regex('Escaped');
     if (preg_match_all($escaped, $str, $matches) && count($matches) > 0) {
         $str = preg_replace_callback($escaped, create_function('$matches', 'return chr(hexdec(substr($matches[0], 1)));'), $str);
     }
     return $str;
 }