Exemplo n.º 1
0
 /**
  * Performs request to the API
  *
  * @param string $key
  * @param array $value
  * @return array
  */
 private function perform($key, $value)
 {
     if (Yii::$app->user->isGuest) {
         return [];
     }
     return $this->connection->createCommand()->perform($key, $value);
 }
Exemplo n.º 2
0
 public function testErrorChecker()
 {
     $this->object->setErrorChecker(function ($res) {
         return $res;
     });
     $this->setExpectedException('hiqdev\\hiart\\ErrorResponseException', $this->result);
     $this->object->get($this->url, [], $this->body, false);
 }
Exemplo n.º 3
0
 /**
  * @param $action
  * @param mixed $body request parameters
  * @return mixed
  */
 public function perform($action, $body = [])
 {
     return $this->db->post($action, [], $body);
 }
Exemplo n.º 4
0
 /**
  * @param $action
  * @param array $options
  *
  * @return mixed
  */
 public function perform($action, $options = [])
 {
     return $this->db->post($action, $options);
 }