TwiML/Voice/Gather::setInput()
has wrong doc type for $input
#778
Open
Description
The documented $input
parameter for the Gather::setInput()
method says it should contain an array of strings:
twilio-php/src/Twilio/TwiML/Voice/Gather.php
Lines 56 to 63 in 6d1f88c
However, this is not the case, as it should accept a single string only, according to the documentation:
https://www.twilio.com/docs/voice/twiml/gather#input
Code Example:
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;
$response = new VoiceResponse();
$gather = $response->gather(['input' => 'speech', 'action' => '/completed']);
$gather->say('Welcome to Twilio, please tell us why you\'re calling');
echo $response;
Expected XML Output:
<?xml version="1.0" encoding="UTF-8"?>
<!-- page located at http://example.com/simple_gather.xml -->
<Response>
<Gather input="speech" action="/completed">
<Say>Welcome to Twilio, please tell us why you're calling</Say>
</Gather>
</Response>