Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace OpenSpout\Reader;
6
 
7
use OpenSpout\Common\Exception\IOException;
8
 
9
/**
10
 * @template T of SheetIteratorInterface
11
 */
12
interface ReaderInterface
13
{
14
    /**
15
     * Prepares the reader to read the given file. It also makes sure
16
     * that the file exists and is readable.
17
     *
18
     * @param string $filePath Path of the file to be read
19
     *
20
     * @throws IOException
21
     */
22
    public function open(string $filePath): void;
23
 
24
    /**
25
     * Returns an iterator to iterate over sheets.
26
     *
27
     * @return T
28
     *
29
     * @throws Exception\ReaderNotOpenedException If called before opening the reader
30
     */
31
    public function getSheetIterator(): SheetIteratorInterface;
32
 
33
    /**
34
     * Closes the reader, preventing any additional reading.
35
     */
36
    public function close(): void;
37
}