PAGI\Client\Result\AmdResult::setStatus PHP Method

setStatus() public method

Sets the cause string
public setStatus ( $status ) : void
return void
    public function setStatus($status)
    {
        $this->status = $status;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * (non-PHPdoc)
  * @see PAGI\Client.IClient::amd()
  */
 public function amd($options = array())
 {
     $knownOptions = array('initialSilence', 'greeting', 'afterGreetingSilence', 'totalAnalysisTime', 'miniumWordLength', 'betweenWordSilence', 'maximumNumberOfWords', 'silenceThreshold', 'maximumWordLength');
     $args = array();
     $total = count($knownOptions);
     for ($i = 0; $i < $total; $i++) {
         $key = $knownOptions[$i];
         if (isset($options[$key])) {
             $args[] = $options[$key];
         } else {
             $args[] = '';
         }
     }
     $result = new AmdResult($this->exec('AMD', $args));
     $result->setStatus($this->getFullVariable('AMDSTATUS'));
     $result->setCause($this->getFullVariable('AMDCAUSE'));
     return $result;
 }