1 | <?php |
||
22 | class EventFactory |
||
23 | { |
||
24 | /** |
||
25 | * Creates a Panda event from the given request. |
||
26 | * |
||
27 | * @param Request $request The request to analyse |
||
28 | * |
||
29 | * @return Event The created event |
||
30 | * |
||
31 | * @throws \InvalidArgumentException if the request could not be converted into a valid event |
||
32 | */ |
||
33 | 10 | public static function createEventFromRequest(Request $request) |
|
52 | |||
53 | /** |
||
54 | * Creates an EncodingCompleteEvent from the given request. |
||
55 | * |
||
56 | * @param Request $request The request to analyse |
||
57 | * |
||
58 | * @return EncodingCompleteEvent The created event |
||
59 | * |
||
60 | * @throws \InvalidArgumentException if some necessary data is not provided |
||
61 | */ |
||
62 | 3 | public static function createEncodingCompleteEventFromRequest(Request $request) |
|
77 | |||
78 | /** |
||
79 | * Creates an EncodingProgressEvent from the given request. |
||
80 | * |
||
81 | * @param Request $request The request to analyze |
||
82 | * |
||
83 | * @return EncodingProgressEvent The created event |
||
84 | * |
||
85 | * @throws \InvalidArgumentException if some necessary data is not provided |
||
86 | */ |
||
87 | 3 | public static function createEncodingProgressEventFromRequest(Request $request) |
|
107 | |||
108 | /** |
||
109 | * Creates a VideoCreatedEvent from the given request. |
||
110 | * |
||
111 | * @param Request $request The request to analyze |
||
112 | * |
||
113 | * @return VideoCreatedEvent The created event |
||
114 | * |
||
115 | * @throws \InvalidArgumentException if some necessary data is not provided |
||
116 | */ |
||
117 | 3 | public static function createVideoCreatedEventFromRequest(Request $request) |
|
132 | |||
133 | /** |
||
134 | * Creates a VideoEncodedEvent from the given request. |
||
135 | * |
||
136 | * @param Request $request The request to analyze |
||
137 | * |
||
138 | * @return VideoEncodedEvent The created event |
||
139 | * |
||
140 | * @throws \InvalidArgumentException if some necessary data is not provided |
||
141 | */ |
||
142 | 3 | public static function createVideoEncodedEventFromRequest(Request $request) |
|
157 | } |
||
158 |