1 | <?php |
||
14 | class SpreadsheetLoader implements SpreadsheetLoaderInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var SpreadsheetLoaderInterface[] |
||
18 | */ |
||
19 | protected $loaders = []; |
||
20 | |||
21 | /** |
||
22 | * Opens a spreadsheet |
||
23 | * |
||
24 | * @param string $path |
||
25 | * @param string|null $type |
||
26 | * |
||
27 | * @return SpreadsheetInterface |
||
28 | * |
||
29 | * @throws InvalidArgumentException |
||
30 | */ |
||
31 | public function open($path, $type = null) |
||
40 | |||
41 | /** |
||
42 | * Addds a loader for a specified type |
||
43 | * |
||
44 | * @param string $type |
||
45 | * @param SpreadsheetLoaderInterface $loader |
||
46 | * |
||
47 | * @return SpreadsheetLoader |
||
48 | */ |
||
49 | public function addLoader($type, SpreadsheetLoaderInterface $loader) |
||
55 | |||
56 | /** |
||
57 | * Returns the type for a path |
||
58 | * |
||
59 | * @param string $path |
||
60 | * |
||
61 | * @return string |
||
62 | */ |
||
63 | protected function getType($path) |
||
67 | } |
||
68 |