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 CollectionObject

A collection object. All collection classes must inherit this. It provides methods to lookup, serialize and put contents in a collection. Collections can represent any extended class where any of those listed in models. does not have an implemention for @class Media

Direct known subclasses

Catapult\ApplicationCollection, Catapult\CallCollection, Catapult\MediaCollection, Catapult\MessageCollection, Catapult\PhoneNumbersCollection, Catapult\RecordingCollection, Catapult\TransactionCollection, Catapult\TranscriptionCollection, Catapult\UserErrorCollection, Catapult\CallEventsCollection, Catapult\CollectionIterator, Catapult\CollectionSequence, Catapult\DomainsCollection, Catapult\EndpointsCollection, Catapult\EndpointsMulti, Catapult\EventCollection, Catapult\GatherCollection

Namespace: Catapult
Class:

CollectionObject. Superset of the collections. Provides auxilary functions to manage, update and get elements within a collection


Located at core/Collections.php

Methods summary

public
# __construct( data $data = array(), $quiet = TRUE )

either pass in infomation as array or datapacket collection identify each element key by its id

either pass in infomation as array or datapacket collection identify each element key by its id

Parameters

$data
initial set of data
$quiet
public
# __toString( )

Serialize the collection object as a JSON object.

Serialize the collection object as a JSON object.

public
# last( )

get the last item within a set. This should always try to get the last item when not found return a null

get the last item within a set. This should always try to get the last item when not found return a null

public
# first( )

get the first item within a set

get the first item within a set

public
# get( id: $id = null )

Get one item from the Collection if item is not initiated, initiate it

Get one item from the Collection if item is not initiated, initiate it

Parameters

$id
valid id inside this collection
public
# setup( data: $d )

Setup the object. This is forward to GenericRecource's load/1. It should add each attribute in the provided set

Setup the object. This is forward to GenericRecource's load/1. It should add each attribute in the provided set

Parameters

$d
array
public
# add( data $data )

Before adding we must make sure the datapacket fits(schema) support two fold init where data can either be the initialized object or raw array

Before adding we must make sure the datapacket fits(schema) support two fold init where data can either be the initialized object or raw array

Parameters

$data
data that is valid for this collection
public
# isEmpty( )

check if our data structure is empty or not. should also retun false when we have a string

check if our data structure is empty or not. should also retun false when we have a string

public collectionsequence
# find( id $terms, $absolute = TRUE )

get a specific entity in the collection

get a specific entity in the collection

Parameters

$terms
id for match
$absolute

Returns

collectionsequence
public
# reload( )

slow on performance. ONLY use if absolutely needed this will reload each item in a collection, individually.

slow on performance. ONLY use if absolutely needed this will reload each item in a collection, individually.

Where objects all must be initiated and have get/1 ready with id

public
# toArray( )

Collection based ToArray should serialize each model into its array

Collection based ToArray should serialize each model into its array

public a
# listIterator( )

iterator over the listing object

iterator over the listing object

Returns

a
CollectionIterator
public
# listAll( )

scenarios where the objects has not been loaded yet added: 2/4/2015. Before: PhoneNumber = new PhoneNumber PhoneNUmbers = PhoneNumber->listAll

scenarios where the objects has not been loaded yet added: 2/4/2015. Before: PhoneNumber = new PhoneNumber PhoneNUmbers = PhoneNumber->listAll

Now: PhoneNumbers = new PhoneNumberCollection PhoneNumbers->listAll

This should always make sure we dont have data already

Bandwidth PHP SDK API documentation generated by ApiGen