Exemplo n.º 1
0
 protected function _getApi(ConnectionInterface $conn, array $reqData = array())
 {
     $request = new HTTPRequest($conn->Session);
     $api = new Api();
     $api->emulate($reqData, $request);
     return $api;
 }
 protected function _handleRequest(Conn $from, $reqData)
 {
     $request = new HTTPRequest($from->Session);
     $apiCall = new Api();
     $apiCall->emulate($reqData, $request);
     $apiCall->run();
     $resp = $apiCall->httpResponse()->content();
     return $resp;
 }
Exemplo n.º 3
0
 protected function executeApiCall($conn, $req)
 {
     $request = $this->getRequest($conn, $req);
     $response = $this->getResponse($conn, $req);
     $apiCall = new Api();
     $apiCall->emulate($req->getPostFields()->getAll(), $request, $response);
     $apiCall->run();
     return $apiCall->httpResponse();
 }