‪TYPO3CMS  ‪main
Extractor.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
22 
27 {
33  public function ‪getFileTypeRestrictions()
34  {
35  return [];
36  }
37 
44  public function ‪getDriverRestrictions()
45  {
46  return [];
47  }
48 
54  public function ‪getPriority()
55  {
56  return 10;
57  }
58 
64  public function ‪getExecutionPriority()
65  {
66  return 10;
67  }
68 
74  public function ‪canProcess(‪File $file)
75  {
76  return GeneralUtility::makeInstance(OnlineMediaHelperRegistry::class)->getOnlineMediaHelper($file) !== false;
77  }
78 
86  public function ‪extractMetaData(‪File $file, array $previousExtractedData = [])
87  {
88  $helper = GeneralUtility::makeInstance(OnlineMediaHelperRegistry::class)->getOnlineMediaHelper($file);
89  return $helper !== false ? $helper->getMetaData($file) : [];
90  }
91 }
‪TYPO3\CMS\Core\Resource\OnlineMedia\Metadata\Extractor\getFileTypeRestrictions
‪array getFileTypeRestrictions()
Definition: Extractor.php:33
‪TYPO3\CMS\Core\Resource\OnlineMedia\Helpers\OnlineMediaHelperRegistry
Definition: OnlineMediaHelperRegistry.php:27
‪TYPO3\CMS\Core\Resource\Index\ExtractorInterface
Definition: ExtractorInterface.php:25
‪TYPO3\CMS\Core\Resource\OnlineMedia\Metadata\Extractor\getPriority
‪int getPriority()
Definition: Extractor.php:54
‪TYPO3\CMS\Core\Resource\OnlineMedia\Metadata\Extractor\canProcess
‪bool canProcess(File $file)
Definition: Extractor.php:74
‪TYPO3\CMS\Core\Resource\OnlineMedia\Metadata\Extractor\getDriverRestrictions
‪array getDriverRestrictions()
Definition: Extractor.php:44
‪TYPO3\CMS\Core\Resource\OnlineMedia\Metadata\Extractor
Definition: Extractor.php:27
‪TYPO3\CMS\Core\Resource\File
Definition: File.php:26
‪TYPO3\CMS\Core\Resource\OnlineMedia\Metadata
Definition: Extractor.php:16
‪TYPO3\CMS\Core\Resource\OnlineMedia\Metadata\Extractor\getExecutionPriority
‪int getExecutionPriority()
Definition: Extractor.php:64
‪TYPO3\CMS\Core\Resource\OnlineMedia\Metadata\Extractor\extractMetaData
‪array extractMetaData(File $file, array $previousExtractedData=[])
Definition: Extractor.php:86
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52