src/PAGI/Node/MockedNode.php
protected function sayInterruptable($what, array $arguments)
    {
        $client = $this->getClient();
        $logger = $client->getLogger();

        $args = "(" . implode(',', $arguments) . ")";
        $argsCount = count($arguments);
        $interruptDigits = $arguments[$argsCount - 1];

        $this->recordDoneSay($what, array_slice($arguments, 0, $argsCount - 1));
        if (empty($this->mockedInput)) {
            $logger->debug("No more input available");
            $client->onStreamFile(false);
        } else {
            if ($interruptDigits != Node::DTMF_NONE) {
                $digit = array_shift($this->mockedInput);
                if (strpos($interruptDigits, $digit) !== false) {
                    $logger->debug("Digit '$digit' will interrupt $what $args)");
                    $client->onStreamFile(true, $digit);
                } else {
                    if ($digit != ' ') {
                        $logger->warning("Digit '$digit' will not interrupt $what $args)");
                    } else {
                        $logger->warning("Timeout input for $what $args");
                    }
                    $client->onStreamFile(false);
                }
            } else {
                $logger->debug('None interruptable message');
                $client->onStreamFile(false);
            }
        }
    }
protected function sayInterruptable($what, array $arguments)
    {
        $client = $this->getClient();
        $logger = $client->getLogger();

        $args = "(" . implode(',', $arguments) . ")";
        $argsCount = count($arguments);
        $interruptDigits = $arguments[$argsCount - 1];

        $this->recordDoneSay($what, array_slice($arguments, 0, $argsCount - 1));
        if (empty($this->mockedInput)) {
            $logger->debug("No more input available");
            $client->onStreamFile(false);
        } else {
            if ($interruptDigits != Node::DTMF_NONE) {
                $digit = array_shift($this->mockedInput);
                if (strpos($interruptDigits, $digit) !== false) {
                    $logger->debug("Digit '$digit' will interrupt $what $args)");
                    $client->onStreamFile(true, $digit);
                } else {
                    if ($digit != ' ') {
                        $logger->warning("Digit '$digit' will not interrupt $what $args)");
                    } else {
                        $logger->warning("Timeout input for $what $args");
                    }
                    $client->onStreamFile(false);
                }
            } else {
                $logger->debug('None interruptable message');
                $client->onStreamFile(false);
            }
        }
    }
protected function sayInterruptable ( $ what , array $ arguments ) { $ client = $ this -> getClient ( ) ; $ logger = $ client -> getLogger ( ) ; $ args = "(" . implode ( ',' , $ arguments ) . ")" ; $ argsCount = count ( $ arguments ) ; $ interruptDigits = $ arguments [ $ argsCount - 1 ] ; $ this -> recordDoneSay ( $ what , array_slice ( $ arguments , 0 , $ argsCount - 1 ) ) ; if ( empty ( $ this -> mockedInput ) ) { $ logger -> debug ( "No more input available" ) ; $ client -> onStreamFile ( false ) ; } else { if ( $ interruptDigits != Node :: DTMF_NONE ) { $ digit = array_shift ( $ this -> mockedInput ) ; if ( strpos ( $ interruptDigits , $ digit ) !== false ) { $ logger -> debug ( "Digit '$digit' will interrupt $what $args)" ) ; $ client -> onStreamFile ( true , $ digit ) ; } else { if ( $ digit != ' ' ) { $ logger -> warning ( "Digit '$digit' will not interrupt $what $args)" ) ; } else { $ logger -> warning ( "Timeout input for $what $args" ) ; } $ client -> onStreamFile ( false ) ; } } else { $ logger -> debug ( 'None interruptable message' ) ; $ client -> onStreamFile ( false ) ; } } }
Used to mimic the user input per prompt message.

@param string $what
@param array $arguments

@return void
Used to mimic the user input per prompt message .