예제 #1
0
 /**
  * Create musn't preserve the domainId
  * as this will be our path. We will pass
  * it in the parameter, use PathResource
  * then remove it
  *
  * @param: args Endpoint create data
  */
 public function create()
 {
     $data = Ensure::Input(func_get_args());
     $data = $data->get();
     if (isset($data['domainId'])) {
         new PathResource($this, array("domains" => $data['domainId'], "endpoints" => ""));
     }
     return parent::create($data);
 }
예제 #2
0
 /**
  *
  * treat transcriptions
  * create/0 different 
  * as we need the path
  */
 public function create()
 {
     $data = Ensure::Input(func_get_args());
     $data = $data->get();
     if (!isset($data['recordingId'])) {
         $data['recordingId'] = "";
     }
     return parent::create($data, new RemoveResource($this, array("recordingId"), new PathResource($this, array("recordings" => $data['recordingId'], "transcriptions" => ""))));
 }