示例#1
0
文件: common.php 项目: Lazybin/huisa
/**
 * 字符串转换为 数组
 *
 * @param unknown_type $str
 * @return multitype:unknown
 */
function convertStringToArray($str)
{
    return parseQString($str);
}
示例#2
0
 /**
  * 解析customerInfo。
  * 为方便处理,encryptedInfo下面的信息也均转换为customerInfo子域一样方式处理,
  * @param unknown $customerInfostr
  * @return array形式ParseCustomerInfo
  */
 static function parseCustomerInfo($customerInfostr)
 {
     $customerInfostr = base64_decode($customerInfostr);
     $customerInfostr = substr($customerInfostr, 1, strlen($customerInfostr) - 2);
     $customerInfo = parseQString($customerInfostr);
     if (array_key_exists("encryptedInfo", $customerInfo)) {
         $encryptedInfoStr = $customerInfo["encryptedInfo"];
         unset($customerInfo["encryptedInfo"]);
         $encryptedInfoStr = AcpService::decryptData($encryptedInfoStr);
         $encryptedInfo = parseQString($encryptedInfoStr);
         foreach ($encryptedInfo as $key => $value) {
             $customerInfo[$key] = $value;
         }
     }
     return $customerInfo;
 }