/** * Update the gather DTMF * The only update allowed is state:completed * to stop the gather * * @return Gather */ public function stop() { $url = URIResource::Make($this->path, array($this->call_id, "gather", $this->id)); $data = new DataPacket(array("state" => GATHER_STATES::completed)); $this->client->post($url, $data->get()); return Constructor::Make($this, $data->get()); }
public function clean() { $this->entries = []; return parent::clean(); }
public function clean() { $this->input = []; $this->output = []; return parent::clean(); }
public function clean() { $this->slots = []; $this->hotbar = []; return parent::clean(); }
public function clean() { $this->records = []; return parent::clean(); }
public function clean() { $this->teleport = false; return parent::clean(); }
/** * Public API get, this will * call the get function on * the loaded endpoint, optionally * add another id if specified * * * @param id: id to load */ public function get($id = NULL) { if (!$id) { if (!isset($this->id)) { $url = URIResource::Make($this->path); } else { $url = URIResource::Make($this->path, array($this->id)); } $data = new DataPacket($this->client->get($url)); } else { $url = URIResource::Make($this->path, array($id)); $data = new DataPacket($this->client->get($url)); } return Constructor::Make($this, $data->get()); }
/** * Stops a sentence * */ public function stopSentence() { $url = new URIResource($this->getAudioUrl()); $data = new DataPacket(array("sentence" => "")); $this->client->post($url, $data->get()); }
/** * Sends a string of characters as DTMF on the given call_id * Valid chars are '0123456789*#ABCD' * * @param dtmf: dtmf characters */ public function sendDtmf($dtmf) { $args = Ensure::Input($dtmf); $dtmf = $args->get(); $url = URIResource::Make($this->path, array($this->id, "dtmf")); $data = new DataPacket(array("dtmfOut" => (string) $dtmf)); $this->client->post($url, $data->get()); }
/** * Mock get functions * read whether we need to * use an id or not * then run accordingly * last parameter will always * be 'this' object */ public static function get() { $args = func_get_args(); $that = self::get_this($args); $term = self::get_term($args); $id = self::get_id($args); $plural = self::get_is_plural($args); if ($plural) { $url = URIResource::Make($that->path, array($that->id, GenericResource::getPath($term))); $dp = new DataPacketCollection($that->client->get($url)); $cl = GenericResource::getObjClass($term); $pobjcl = "Catapult\\" . $cl . "Collection"; $pobj = new $pobjcl($dp); return $pobj; } else { $url = URIResource::Make($that->path, array($that->id, GenericResource::getPath($term))); $dp = new DataPacket($that->client->get($url)); $cl = GenericResource::getObjClass($term); $pobjcl = "Catapult\\" . $cl; $pobj = new $pobjcl(); return Constructor::Make($pobj, $dp->get()); } return Constructor::Make($pobj, $dp->get()); }