PHP Version 5
/** * (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; }