Skip to content

Conversation

@dragonmantank
Copy link
Contributor

@dragonmantank dragonmantank commented Sep 18, 2019

This shows how to update an existing call with an NCCO transfer, instead of using the \Nexmo\Call\Transfer class.

This also has some cleanup on the naming used for the application key and private key path, the .env-example file does not match what we really use.

This also introduces a few conventions I want to start using during the code snippet cleanup.

  1. Use of $argv instead of relying on transient defines. Turns out it's really easy to disable inline environment variables in PHP
  2. Using error_log() whenever an error happens, to get proper stderr output. Previously it and echo were used interchangeably.
  3. Proper exit codes (PHP naturally exits with 0, so only need to explicitly exit() when there is an error).
Copy link
Contributor

@lornajane lornajane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works like a charm

@lornajane lornajane merged commit d22a7c9 into master Sep 19, 2019
@lornajane lornajane deleted the transfer-call-with-ncco branch September 19, 2019 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants