예제 #1
0
 public function performDelete($url, $arguments, $accept)
 {
     // Decode url
     UrlHelper::Decode($url, $model, $objectId);
     // Get Mapping
     $mapping = MappingHelper::GetMapping($model);
     if ($mapping != null) {
         $object = $mapping->DbTableName;
     } else {
         $object = $model;
     }
     // Delete
     $dbWriter = new DbWriter();
     $dbWriter->Open();
     $dbWriter->Delete($object, $objectId);
     $dbWriter->Close();
     header('Content-type: application/json; charset=utf-8');
     header('', true, HttpStatus::OK);
 }