예제 #1
0
 /**
  * Endpoints overloads the load/1
  * function we need to rebuild its
  * path resource
  * we need: 
  * domains/{domain-id}/endpoints/{endpoint-id}
  *
  * Implementors note:
  * this was added to get around CollectionObject's
  * listAll function which will need to
  * set up this without having to do another RESTful get
  */
 public function load()
 {
     $data = Ensure::Input(func_get_args());
     $data = $data->get();
     $Endpoint = parent::load($data);
     $Endpoint->path = new PathResource($this, array("domains" => $data['domainId'], "endpoints" => ""));
     return $Endpoint;
 }
예제 #2
0
 /**
  * Patch for collection
  * based objects we need the
  * path to be loaded seperatly
  * and make sure the recordingId
  * is preserved
  */
 public function load()
 {
     $data = Ensure::Input(func_get_args());
     $data = $data->get();
     return parent::load($data, new PathResource($this, array("recordings" => $data['recordingId'], "transcriptions" => "")));
 }