Conditions | 5 |
Paths | 2 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function __construct($event, $active) |
||
27 | { |
||
28 | // normalise event names |
||
29 | $event = strtr($event, '_', '-'); |
||
30 | |||
31 | // check for valid event names |
||
32 | if ( |
||
33 | $event != 'video-created' && $event != 'video-encoded' && |
||
34 | $event != 'encoding-progress' && $event != 'encoding-completed' |
||
35 | ) { |
||
36 | throw new \InvalidArgumentException('Unknown notification event $event'); |
||
37 | } |
||
38 | |||
39 | $this->event = $event; |
||
40 | $this->active = $active; |
||
41 | } |
||
42 | |||
53 |