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 Credentials

Get and set the credential in the JSON file if we cant find credentials.json

Final
Namespace: Catapult
Object:

Credentials can also be loaded by associative an array or from the envorinment variables


Located at core/Credentials.php

Methods summary

public
# __construct( user_token: $user_token = '', api_token: $api_token = '', api_secret: $api_secret = '' )

All string parameters if provided use these in place of json credentials

All string parameters if provided use these in place of json credentials

Parameters

$user_token
user id
$api_token
token
$api_secret
secret
public
# get( $key = null )
protected stdClass
# getParamInstance( )

Returns the area we've initialized the credentials object with. Possibilities

Returns the area we've initialized the credentials object with. Possibilities

Returns

stdClass

[JSON Object] \stdClass [CredentialsUser]

protected
# getVal( key: $key, show: $show = TRUE )

Gets either a singular or array based value by key. Where all keys are elements in the credentials.json file.

Gets either a singular or array based value by key. Where all keys are elements in the credentials.json file.

Parameters

$key
for element
$show
with asterisks
public
# getNumber( idx: $idx )

Gets a number from the provided set in credentials.json. This will not have any affect towards the PhoneNumber service.

Gets a number from the provided set in credentials.json. This will not have any affect towards the PhoneNumber service.

Parameters

$idx
of number
public
# getApplicationId( idx: $idx = 0 )

Shortcut. Get the first app id. Usage

Shortcut. Get the first app id. Usage

Parameters

$idx
of app
public
# set( key: $key, val: $val )

Set a value at runtime

Set a value at runtime

Parameters

$key
to set
$val
value
public static
# setPath( path: $path )

Sets the path of credentials.json

Sets the path of credentials.json

Parameters

$path
path
public static
# setFile( file: $file )

Sets the file to find credentials suitable when the term credentials is not being used for the credentials file

Sets the file to find credentials suitable when the term credentials is not being used for the credentials file

Parameters

$file
file

Properties summary

public static array $credentials_opts

credentials should initially be set to 'credentials.json' which will be found in the parent directory

credentials should initially be set to 'credentials.json' which will be found in the parent directory

# array( "file" => "credentials.json" )
Bandwidth PHP SDK API documentation generated by ApiGen