Skip to content

Commit b25870e

Browse files
committed
Changed README examples of NCCO to use static factories
1 parent 050244e commit b25870e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,7 @@ $outboundCall = new \Vonage\Voice\OutboundCall(
289289
);
290290

291291
$ncco = new NCCO();
292-
$record = new \Vonage\Voice\NCCO\Action\Record;
293-
$ncco->addAction($record->factory([
292+
$ncco->addAction(\Vonage\Voice\NCCO\Action\Record::factory([
294293
'eventUrl' => 'https://webhook.url'
295294
]);
296295
$outboundCall->setNCCO($ncco);
@@ -361,13 +360,11 @@ $outboundCall = new \Vonage\Voice\OutboundCall(
361360

362361
$ncco = new NCCO();
363362

364-
$talk = new \Vonage\Voice\NCCO\Action\Talk;
365-
$ncco->addAction($talk->factory('Please record your name.',[
363+
$ncco->addAction(\Vonage\Voice\NCCO\Action\Talk::factory('Please record your name.',[
366364
'bargeIn' => true,
367365
]));
368366

369-
$input = new \Vonage\Voice\NCCO\Action\Input;
370-
$ncco->addAction($input->factory([
367+
$ncco->addAction(\Vonage\Voice\NCCO\Action\Input::factory([
371368
'eventUrl' => 'https://webhook.url',
372369
'type' => [
373370
'speech',

0 commit comments

Comments
 (0)