[TASK] Removes extra empty lines
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Resource / Index / ExtractorInterface.php
1 <?php
2 namespace TYPO3\CMS\Core\Resource\Index;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 use TYPO3\CMS\Core\Resource;
18
19 /**
20 * An Interface for MetaData extractors the FAL Indexer uses
21 */
22 interface ExtractorInterface
23 {
24 /**
25 * Returns an array of supported file types;
26 * An empty array indicates all filetypes
27 *
28 * @return array
29 */
30 public function getFileTypeRestrictions();
31
32 /**
33 * Get all supported DriverClasses
34 *
35 * Since some extractors may only work for local files, and other extractors
36 * are especially made for grabbing data from remote.
37 *
38 * Returns array of string with driver names of Drivers which are supported,
39 * If the driver did not register a name, it's the classname.
40 * empty array indicates no restrictions
41 *
42 * @return array
43 */
44 public function getDriverRestrictions();
45
46 /**
47 * Returns the data priority of the extraction Service.
48 * Defines the precedence of Data if several extractors
49 * extracted the same property.
50 *
51 * Should be between 1 and 100, 100 is more important than 1
52 *
53 * @return int
54 */
55 public function getPriority();
56
57 /**
58 * Returns the execution priority of the extraction Service
59 * Should be between 1 and 100, 100 means runs as first service, 1 runs at last service
60 *
61 * @return int
62 */
63 public function getExecutionPriority();
64
65 /**
66 * Checks if the given file can be processed by this Extractor
67 *
68 * @param Resource\File $file
69 * @return bool
70 */
71 public function canProcess(Resource\File $file);
72
73 /**
74 * The actual processing TASK
75 *
76 * Should return an array with database properties for sys_file_metadata to write
77 *
78 * @param Resource\File $file
79 * @param array $previousExtractedData optional, contains the array of already extracted data
80 * @return array
81 */
82 public function extractMetaData(Resource\File $file, array $previousExtractedData = array());
83 }