Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; under version 2 |
| 7 | * of the License (non-upgradable). |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | * |
| 18 | * Copyright (c) 2016 (original work) Open Assessment Technologies SA; |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | namespace oat\taoProctoring\model\deliveryLog; |
| 23 | |
| 24 | use oat\taoDelivery\model\execution\Delete\DeliveryExecutionDelete; |
| 25 | |
| 26 | /** |
| 27 | * Interface DeliveryLog |
| 28 | * |
| 29 | * @package oat\taoProctoring\model\deliveryLog |
| 30 | * @author Aleh Hutnikau <hutnikau@1pt.com> |
| 31 | */ |
| 32 | interface DeliveryLog extends DeliveryExecutionDelete |
| 33 | { |
| 34 | public const SERVICE_ID = 'taoProctoring/DeliveryLog'; |
| 35 | |
| 36 | /** |
| 37 | * list of searchable fields |
| 38 | */ |
| 39 | public const OPTION_FIELDS = 'fields'; |
| 40 | |
| 41 | public const DELIVERY_EXECUTION_ID = 'delivery_execution_id'; |
| 42 | public const EVENT_ID = 'event_id'; |
| 43 | public const DATA = 'data'; |
| 44 | public const CREATED_AT = 'created_at'; |
| 45 | public const CREATED_BY = 'created_by'; |
| 46 | public const ID = 'id'; |
| 47 | |
| 48 | /** |
| 49 | * @param array $data |
| 50 | * @return mixed |
| 51 | */ |
| 52 | public function insertMultiple(array $data); |
| 53 | |
| 54 | /** |
| 55 | * Log data |
| 56 | * |
| 57 | * @param string $deliveryExecutionId |
| 58 | * @param string $eventId |
| 59 | * @param mixed $data |
| 60 | * @param string $user user id to be stored as `created_by` value |
| 61 | * @return boolean |
| 62 | */ |
| 63 | public function log($deliveryExecutionId, $eventId, $data, $user = null); |
| 64 | |
| 65 | /** |
| 66 | * Get logged data by delivery execution id |
| 67 | * |
| 68 | * @param string $deliveryExecutionId |
| 69 | * @param string|null $eventId - filter data by event id |
| 70 | * @return mixed |
| 71 | */ |
| 72 | public function get($deliveryExecutionId, $eventId = null); |
| 73 | |
| 74 | /** |
| 75 | * |
| 76 | * @return bool true if it correctly flush false otherwise |
| 77 | */ |
| 78 | public function flush(); |
| 79 | |
| 80 | /** |
| 81 | * @param array $params |
| 82 | * [ |
| 83 | * 'delivery_execution_id' => '', |
| 84 | * 'event_id' => '', |
| 85 | * 'from' => '', |
| 86 | * 'to' => '', |
| 87 | * 'created_by' => '', |
| 88 | * ] |
| 89 | * @param array $options |
| 90 | * [ |
| 91 | * 'order' => 'created_at', |
| 92 | * 'dir' => 'asc', |
| 93 | * 'limit' => null, // to get all records |
| 94 | * 'offset' => 0, |
| 95 | * 'shouldDecodeData' => true |
| 96 | * ] |
| 97 | * @return mixed |
| 98 | */ |
| 99 | public function search($params = [], $options = []); |
| 100 | } |