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 GenericResource

GenericResource is the class every model should use for initialization. It provides the functions to check the mandatory, optional arguments provided

Direct known subclasses

Catapult\Account, Catapult\Application, Catapult\MessageMulti, Catapult\NumberInfo, Catapult\PhoneNumbers, Catapult\Recording, Catapult\ResolverResource, Catapult\Transaction, Catapult\Transcription, Catapult\UserError, Catapult\AudioMixin, Catapult\Bridge, Catapult\CallEvents, Catapult\Domains, Catapult\Endpoints, Catapult\Gather, Catapult\Media, Catapult\Message

Indirect known subclasses

Catapult\BridgeCollection, Catapult\Call, Catapult\Conference, Catapult\ConferenceMember, Catapult\Resolver

Namespace: Catapult
Located at resource/Base.php

Methods summary

public this->camelizedContext
# __call( function $function, $args )

accomodate for camelcase vs underscore

accomodate for camelcase vs underscore

update adds prototyped functions for quicker mockups

Parameters

$function
underscored function
$args

Returns

this->camelizedContext
ex: $call->listCalls -> $call->list_calls
public
# _init( $data, $depends, $loads, $schema, $extras = null )

_init performs basic functions to set up all the subclasses. Will call the normal execution order.

_init performs basic functions to set up all the subclasses. Will call the normal execution order.

  • first attach the client
  • check if the schema is properly formed
  • initialize path with dependancies
  • return the appropriate object use in resolver added: 1/29/2015
public
# get_sub_function( fn: $fn )

checks if a given term lands in subfunctions

checks if a given term lands in subfunctions

Parameters

$fn
function name
public
# get( id: $id = NULL )

Public API get, this will call the get function on the loaded endpoint, optionally add another id if specified

Public API get, this will call the get function on the loaded endpoint, optionally add another id if specified

Parameters

$id
to load
public string
# __toString( )

default string representation of object.

default string representation of object.

TODO: move to StringifyResource

Returns

string
that represents the object
public
# _list( args $args = null )

Generic list. Moved from independant declaration, should work on all models

Generic list. Moved from independant declaration, should work on all models

Parameters

$args
with page, and size [optional]
public
# create( )

General purpose create

General purpose create

public
# update( )
public
# check( k: $k, v: $v )

check will retrieve latest info of the entity then compare a field to a given value ex: $call->check('state', 'active') => TRUE

check will retrieve latest info of the entity then compare a field to a given value ex: $call->check('state', 'active') => TRUE

Parameters

$k
to check
$v
to compare against
public
# delete( id $id = null )

delete a media file

delete a media file

TODO: this should not keep the object's information. This will not be useful anymore!

Parameters

$id
model
public
# load( )

load the object with static properties usually done client side -- or by collections already holding information on an object

load the object with static properties usually done client side -- or by collections already holding information on an object

public
# reload( )

reload the object with updated information this will call the member's get function and check for changes.

reload the object with updated information this will call the member's get function and check for changes.

public
# getAudioUrl( )

gets the audio url for a resource Usually this is extended by a model

gets the audio url for a resource Usually this is extended by a model

public
# getPath( $class )

helper get the path for a given class fallback: plural lowercased

public
# getObjClass( $path )

get the class for a given path fallback: singular titlecased

get the class for a given path fallback: singular titlecased

public
# getSchemaString( $ctx = null )

get the schema fields in a comma seperated form

get the schema fields in a comma seperated form

public
# toArray( )

make all properties an array

make all properties an array

Properties summary

public $lastUpdate
#
public static array $paths
# array( "Application" => "applications", "Call" => "calls", "Conference" => "conferences", "ConferenceMember" => "members", "UserError" => "errors", "Message" => "messages", "PhoneNumbers" => "phoneNumbers", "Recording" => "recordings", "Account" => "account", "Transcription" => "transcriptions", "Bridge" => "bridges", "NumberInfo" => "numberInfo", "Transaction" => "transactions", "Domains" => "domains", "Endpoints" => "endpoints", "Media" => "media", "CallEvents" => "events", "Gather" => "gather" )
Bandwidth PHP SDK API documentation generated by ApiGen