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) 2015 (original work) Open Assessment Technologies SA;
19 *
20 *
21 */
22
23namespace oat\taoQtiItem\model\flyExporter\simpleExporter;
24
25use oat\oatbox\filesystem\File;
26
27/**
28 * Service to export item data
29 *
30 * Interface SimpleExporter
31 * @package oat\taoQtiItem\model\simpleExporter
32 */
33interface SimpleExporter
34{
35    public const SERVICE_ID = 'taoQtiItem/simpleExporter';
36
37    /**
38     * Main action to launch export
39     *
40     * @param \core_kernel_classes_Resource[] $items
41     * @return mixed
42     */
43    public function export(array $items = null);
44
45    /**
46     * Extract data from items
47     *
48     * @param array $items
49     * @return array
50     */
51    public function getDataByItems(array $items);
52
53    /**
54     * Extract data from one item
55     *
56     * @param \core_kernel_classes_Resource $item
57     * @return array
58     */
59    public function getDataByItem(\core_kernel_classes_Resource $item);
60
61    /**
62     * Save extracted to a file, return file or file path, depending of $asFile
63     *
64     * @param array $headers
65     * @param array $data
66     * @return string
67     */
68    public function save(array $headers, array $data);
69
70    /**
71     * Get headers of csv
72     *
73     * @return array
74     */
75    public function getHeaders();
76}