Example #1
0
 public function getProducts()
 {
     # code...
     $pid = new getproduct();
     $post = json_decode(Flight::request()->getBody());
     DuoWorldCommon::mapToObject($post, $pid);
     $client = ObjectStoreClient::WithNamespace(DuoWorldCommon::GetHost(), "Products", "123");
     $respond = $client->get()->byKey($post->productId);
     echo json_encode($respond);
 }
Example #2
0
 public function addRecord($obj)
 {
     $client = ObjectStoreClient::WithNamespace(DuoWorldCommon::GetHost(), "Ledger", "123");
     $respond = $client->store()->byKeyField("InvoiceNumber")->andStore($obj);
     return $respond;
 }
 public function getAllGroups()
 {
     $client = ObjectStoreClient::WithNamespace(DuoWorldCommon::GetHost(), "UserGroup", "123");
     $respond = $client->get()->all();
     echo json_encode($respond);
 }