示例#1
0
 /**
  * Fetch the result of the call
  *
  * @see getCode
  * @see getMessage
  * @param string  $call_id
  * @return string either pass/fail/calling
  */
 function fetch($call_id)
 {
     $call = new Varilogix_Request($this->_api);
     $call->setParams(array("call_id" => $call_id));
     $this->_rawResponse = $call->execute();
     $result = explode(",", $this->_rawResponse);
     $this->_code = trim($result[1]);
     $this->_message = trim($result[2]);
     return trim($result[0]);
 }
示例#2
0
 /**
  * Returns the result of the call request.  You can see the codes in
  * /docs/ERROR_CODES.txt
  *
  * @see getCode
  * @see getMessage
  * @return bool
  * @author Eric Coleman <*****@*****.**>
  * */
 function call()
 {
     if (empty($this->ip)) {
         $this->ip = $this->_getUserIp();
     }
     $call = new Varilogix_Request($this->_api);
     $call->setParams(get_object_vars($this));
     $this->_rawResponse = $call->execute();
     $result = explode(",", $this->_rawResponse);
     $this->_code = trim($result[1]);
     $this->_message = trim($result[2]);
     return trim($result[0]);
 }