/** * 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); }
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); }
/** * @param $action * @param mixed $body request parameters * @return mixed */ public function perform($action, $body = []) { return $this->db->post($action, [], $body); }
/** * @param $action * @param array $options * * @return mixed */ public function perform($action, $options = []) { return $this->db->post($action, $options); }