/**
  * @param $sign
  * @param $sign_type
  *
  * @dataProvider doubleParamProvider
  */
 public function testSort($sign, $sign_type)
 {
     $this->base_param->setSign($sign);
     $this->base_param->setSignType($sign_type);
     $this->base_param->sort();
     $this->assertEquals(array('sign' => $sign, 'sign_type' => $sign_type), $this->base_param->getParams());
 }
Exemple #2
0
 public function buildParamArray(BaseParam $param)
 {
     $param->filter();
     $param->sort();
     $param->setSign(EncryptionFactory::create($this->config)->sign($param->getParamString()));
     $param->setSignType($this->config->sign_type);
     return $param->getParams();
 }
Exemple #3
0
 public function buildParam(BaseParam $param, $result_type = 'array')
 {
     $param->filter();
     $param->sort();
     $param->setSign(EncryptionFactory::create($this->config)->sign($param->getParamString()));
     $param->setSignType($this->config->sign_type);
     if ($result_type == 'array') {
         return $param->getParams();
     } else {
         return $param->getParamString();
     }
 }