# Class EventType

A generic to handle all event types. Afterwards it should initiate the type specified in datapacket

EventType($data) where data

i.e data: { "eventType": "sms" } makes MessageEvent

  Catapult\Event
  Catapult\EventType

### Direct known subclasses

`Catapult\AnswerCallEvent`, `Catapult\CallEvent`, `Catapult\PlaybackCallEvent`, `Catapult\RecordingCallEvent`, `Catapult\RejectCallEvent`, `Catapult\SpeakCallEvent`, `Catapult\TimeoutCallEvent`, `Catapult\TranscriptionCallEvent`, `Catapult\ConferenceEventMixin`, `Catapult\ConferencePlaybackEvent`, `Catapult\DtmfCallEvent`, `Catapult\ErrorCallEvent`, `Catapult\GatherCallEvent`, `Catapult\HangupCallEvent`, `Catapult\IncomingCallEvent`, `Catapult\MessageEvent`

### Indirect known subclasses

`Catapult\ConferenceMemberEvent`

Namespace: Catapult
Located at events/Base.php

## Methods summary

`public` | # `__construct( $resource = NULL )` #### Overrides `Catapult\Event::__construct`
`public` | # `__toString( )` TODO: models provide stringify functionality which resembles: TODO: models provide stringify functionality which resembles: CLASS(op1, op2, op3) --- event information should be included
`public` | # `_init( proto: $proto, class: $class = null )` _init will register things used by this event object _init will register things used by this event object #### Parameters $proto needs to be two arity $class model class
`public` | # `isInvoked( $args )`
`public` | # `isActive( )` isActive/1 tells us if the event is being used or not. This will make all other events non functional isActive/1 tells us if the event is being used or not. This will make all other events non functional
`public` | # `__invoke( )` calling the event should be the same as using isActive/0, as a result: calling the event should be the same as using isActive/0, as a result: answerCallEvent->isActive() = answerCallEvent
`public` | # `__call( function: $function, args: $args )` Event calls should be forwaded to their models Event calls should be forwaded to their models This will be identical to Call->create where create is any function of the public API #### Parameters $function function $args for function #### Overrides `Catapult\Event::__call`
`public` | # `__get( prop: $prop )` Same for properties all should be identical Same for properties all should be identical #### Parameters $prop for object #### Overrides `Catapult\Event::__get`