Bandwidth PHP SDK
  • Namespace
  • Class

Namespaces

  • Catapult
  • None

Classes

  • Account
  • AnswerCallEvent
  • Application
  • ApplicationCollection
  • AudioMixin
  • BaML
  • BaMLAssert
  • BaMLAttribute
  • BaMLContainer
  • BaMLGather
  • BaMLGeneric
  • BaMLHangup
  • BaMLPlayAudio
  • BaMLRedirect
  • BaMLResource
  • BaMLSendMessage
  • BaMLSpeakSentence
  • BaMLText
  • BaMLTransfer
  • BaMLVerb
  • BaMLVerbGather
  • BaMLVerbHangup
  • BaMLVerbPlayAudio
  • BaMLVerbRecord
  • BaMLVerbRedirect
  • BaMLVerbSendMessage
  • BaMLVerbSpeakSentence
  • BaMLVerbTransfer
  • BaseResource
  • BaseUtilities
  • Bridge
  • BridgeCollection
  • Call
  • Callback
  • CallCollection
  • CallCombo
  • CallEvent
  • CallEvents
  • CallEventsCollection
  • Cleaner
  • Client
  • ClientResource
  • CollectionIterator
  • CollectionObject
  • CollectionSequence
  • Conference
  • ConferenceEventMixin
  • ConferenceMember
  • ConferenceMemberEvent
  • ConferencePlaybackEvent
  • Constructor
  • Converter
  • Credentials
  • CredentialsUser
  • DataPacket
  • DataPacketCollection
  • Date
  • DependsObject
  • DependsResource
  • Domains
  • DomainsCollection
  • DTMF
  • DtmfCallEvent
  • Endpoints
  • EndpointsCollection
  • EndpointsCredentials
  • EndpointsMulti
  • EndpointsToken
  • Ensure
  • EnsureResource
  • ErrorCallEvent
  • Event
  • EventAssert
  • EventCollection
  • EventResource
  • EventType
  • FileHandler
  • Gather
  • GatherCallEvent
  • GatherCollection
  • GenericResource
  • HangupCallEvent
  • Id
  • IncomingCallEvent
  • LoadsResource
  • Locator
  • Log
  • Media
  • MediaCollection
  • MediaURL
  • Message
  • MessageCollection
  • MessageEvent
  • MessageMulti
  • MetaResource
  • Multi
  • NumberInfo
  • Page
  • Parameters
  • PathResource
  • PhoneCombo
  • PhoneNumber
  • PhoneNumbers
  • PhoneNumbersCollection
  • PlaybackCallEvent
  • PrototypeUtility
  • Recording
  • RecordingCallEvent
  • RecordingCollection
  • RejectCallEvent
  • RemoveResource
  • Resolver
  • ResolverResource
  • RESTClient
  • SchemaResource
  • Sentence
  • SIP
  • SIPRealm
  • Size
  • SpeakCallEvent
  • StringifyResource
  • SubfunctionObject
  • SubFunctionResource
  • TextMessage
  • Timeout
  • TimeoutCallEvent
  • TitleUtility
  • Transaction
  • TransactionCollection
  • Transcription
  • TranscriptionCallEvent
  • TranscriptionCollection
  • Types
  • URIResource
  • UserError
  • UserErrorCollection
  • VerifyResource
  • Voice
  • XMLUtility

Interfaces

  • API
  • API_MODE
  • BAML_SETTINGS
  • BAML_VERBS
  • BAML_XML_HANDLERS
  • BAML_XML_METHODS
  • BAML_XML_OPTIONS
  • CALL_ERROR
  • CALL_STATES
  • CONFERENCE_MEMBER_STATES
  • CONFERENCE_SPEAK_STATES
  • CONFERENCE_STATES
  • DEFAULTS
  • EXCEPTIONS
  • GATHER_REASONS
  • GATHER_STATES
  • MESSAGE_DIRECTIONS
  • MESSAGE_STATES
  • NUMBER_STATES
  • PATHS
  • PLAYBACK_STATES
  • RECORDING_STATES
  • RECORDING_STATUSES
  • SPEAK_STATES
  • TRANSCRIPTION_STATES
  • WARNINGS

Class RESTClient

Final
Namespace: Catapult
Located at core/Client.php

Methods summary

public
# __construct( user_id $user_id = '', app_id $auth = array(), auth $app_id = API::API_DEFAULT_APPLICATION, Catapult\RESTClient::endpoint() $endpoint = API::API_ENDPOINT, $interop = API::APPLICATION_JSON )

CTor for RESTful client default to definition of endpoint, interop format

CTor for RESTful client default to definition of endpoint, interop format

Parameters

$user_id
Catapult User Id
$auth
Primary app id
$app_id
API Credentials
$endpoint
Catapult endpoint
$interop
protected
# setOption( $k, $t )

Set an option for request

Set an option for request

Parameters

$k
string
$t
mixed
protected
# options( k $k )

Return all options assigned to element k. These are all CURL properites and can be found @

Return all options assigned to element k. These are all CURL properites and can be found @

Parameters

$k
option
public static
# endpoint( endpoint: $endpoint = API::API_ENDPOINT )

Set the Catapult endpoint to be used

Set the Catapult endpoint to be used

To reset to the default use: Catapult\RESTClient::endpoint();

Parameters

$endpoint
to use
public static
# ssl( on: $on = TRUE )

Whether to use ssl or not. To extend support of SSL you can use a private key file which will be used in conjuction with the RESTclient. Catapult\RESTClient::ssl(TRUE) Catapult\RESTClient::ssl_key("./path_to_key");

Whether to use ssl or not. To extend support of SSL you can use a private key file which will be used in conjuction with the RESTclient. Catapult\RESTClient::ssl(TRUE) Catapult\RESTClient::ssl_key("./path_to_key");

To turn off (use no ssl): Catapult\RESTClient::ssl(FALSE);

Parameters

$on
TRUE|FALSE
public static
# sslKey( file: $file )

Set the SSL key file used in CURL requests.

Set the SSL key file used in CURL requests.

Parameters

$file
or fully qualified file path
public static
# verify( verify: $verify = TRUE )

Do we need to verify this SSL request? By default we only do if there is a key provided. If not, no

Do we need to verify this SSL request? By default we only do if there is a key provided. If not, no

Parameters

$verify
TRUE|FALSE
public
# join( url: $url, $users = TRUE )

Concatenate URL according to Catapult endpoints

Concatenate URL according to Catapult endpoints

In some cases we dont need to join, As a result this should only provide the user id, and base string

Parameters

$url
url
$users
public
# get( -> $url, -> $params = array(), $join = TRUE, $users = TRUE )

Perform get requests against Catapult API.

Perform get requests against Catapult API.

Parameters

$url
string [partially qualified]
$params
bool
$join
$users
public
# post( -> $url, -> $data = array(), $join = TRUE, $users = TRUE, $mixed = FALSE )

POST request

POST request

Parameters

$url
[partially qualified]
$data
boolean
$join
$users
$mixed
public
# put( -> $url, -> $data )

PUT request

PUT request

Parameters

$url
[partially qualified]
$data
boolean
public
# delete( -> $url, -> $data = null )

DELETE request

DELETE request

Parameters

$url
[partially qualified]
$data
boolean

Properties summary

public static array $CURL_OPTS
# array( CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 60, CURLOPT_USERAGENT => 'catapult-php-sdk.5.0' )
public static array $media_formats

media types we need to handle *

media types we need to handle *

# array( "audio/wav", "audio/mp3" )
public static array $standard_opts

settings for SSL. *

settings for SSL. *

# array( "endpoint" => null, "ssl" => TRUE, "ssl_key" => FALSE, "verify" =>FALSE )
Bandwidth PHP SDK API documentation generated by ApiGen