[CLEANUP] The correct case must be used for standard PHP types in phpdoc
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Resource / OnlineMedia / Helpers / OnlineMediaHelperInterface.php
1 <?php
2 namespace TYPO3\CMS\Core\Resource\OnlineMedia\Helpers;
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\File;
18 use TYPO3\CMS\Core\Resource\Folder;
19
20 /**
21 * Interface OnlineMediaInterface
22 */
23 interface OnlineMediaHelperInterface
24 {
25 /**
26 * Constructor
27 *
28 * @param string $extension file extension bind to the OnlineMedia helper
29 */
30 public function __construct($extension);
31
32 /**
33 * Try to transform given URL to a File
34 *
35 * @param string $url
36 * @param Folder $targetFolder
37 * @return File|null
38 */
39 public function transformUrlToFile($url, Folder $targetFolder);
40
41 /**
42 * Get Online Media item id
43 *
44 * @param File $file
45 * @return string
46 */
47 public function getOnlineMediaId(File $file);
48
49 /**
50 * Get public url
51 *
52 * Return NULL if you want to use core default behaviour
53 *
54 * @param File $file
55 * @param bool $relativeToCurrentScript
56 * @return string|null
57 */
58 public function getPublicUrl(File $file, $relativeToCurrentScript = false);
59
60 /**
61 * Get local absolute file path to preview image
62 *
63 * Return an empty string when no preview image is available
64 *
65 * @param File $file
66 * @return string
67 */
68 public function getPreviewImage(File $file);
69
70 /**
71 * Get meta data for OnlineMedia item
72 *
73 * See $GLOBALS[TCA][sys_file_metadata][columns] for possible fields to fill/use
74 *
75 * @param File $file
76 * @return array with metadata
77 */
78 public function getMetaData(File $file);
79 }