protected function callClientMethod($name, array $arguments = array()) { $this->logDebug("{$name}(" . implode(",", $arguments) . ")"); return call_user_func_array(array($this->client, $name), $arguments); }
/** * (non-PHPdoc) * @see PAGI\Node.Node::callClientMethods() */ protected function callClientMethods($methods, $stopWhen = null) { $client = $this->getClient(); $logger = $client->getLogger(); $result = null; foreach ($methods as $callInfo) { foreach ($callInfo as $name => $arguments) { switch ($name) { case 'streamFile': case 'sayNumber': case 'sayDigits': case 'sayDateTime': $this->sayInterruptable($name, $arguments); break; case 'waitDigit': if (empty($this->mockedInput)) { $client->onWaitDigit(false); } else { $digit = array_shift($this->mockedInput); if ($digit == ' ') { $client->onWaitDigit(false); } else { $client->onWaitDigit(true, $digit); } } break; default: break; } $result = parent::callClientMethod($name, $arguments); if ($stopWhen !== null) { if ($stopWhen($result)) { return $result; } } } } return $result; }