File tree Expand file tree Collapse file tree 7 files changed +35
-58
lines changed
MediaGallerySynchronization/Model
lib/internal/Magento/Framework Expand file tree Collapse file tree 7 files changed +35
-58
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Eav \Model \Attribute \Data ;
7
7
8
- use Magento \Framework \Filesystem \ExtendedDriverInterface ;
8
+ use Magento \Framework \Filesystem \DriverInterface ;
9
9
10
10
/**
11
11
* EAV Entity Attribute Image File Data Model
@@ -29,7 +29,7 @@ protected function _validateByRules($value)
29
29
{
30
30
$ label = __ ($ this ->getAttribute ()->getStoreLabel ());
31
31
$ rules = $ this ->getAttribute ()->getValidateRules ();
32
- $ localStorage = !$ this ->_directory ->getDriver () instanceof ExtendedDriverInterface ;
32
+ $ localStorage = !$ this ->_directory ->getDriver () instanceof DriverInterface ;
33
33
$ imageProp = $ localStorage
34
34
? @getimagesize ($ value ['tmp_name ' ])
35
35
: $ this ->_directory ->getDriver ()->getMetadata ($ value ['tmp_name ' ]);
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ public function execute(string $path): AssetInterface
75
75
$ absolutePath = $ this ->getMediaDirectory ()->getAbsolutePath ($ path );
76
76
$ driver = $ this ->getMediaDirectory ()->getDriver ();
77
77
78
- if ($ driver instanceof Filesystem \ExtendedDriverInterface ) {
78
+ if ($ driver instanceof Filesystem \DriverInterface ) {
79
79
$ meta = $ driver ->getMetadata ($ absolutePath );
80
80
} else {
81
81
/**
Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \RemoteStorage \Driver ;
9
9
10
- use Magento \Framework \Filesystem \ExtendedDriverInterface ;
10
+ use Magento \Framework \Filesystem \DriverInterface ;
11
11
12
12
/**
13
13
* Remote storage driver.
14
14
*/
15
- interface RemoteDriverInterface extends ExtendedDriverInterface
15
+ interface RemoteDriverInterface extends DriverInterface
16
16
{
17
17
/**
18
18
* Test storage connection.
Original file line number Diff line number Diff line change 15
15
* Utility for mime type retrieval
16
16
*
17
17
* @deprecated
18
- * @see Filesystem\ExtendedDriverInterface ::getMetadata()
18
+ * @see Filesystem\DriverInterface ::getMetadata()
19
19
*/
20
20
class Mime
21
21
{
@@ -113,7 +113,7 @@ public function getMimeType($file)
113
113
throw new FileSystemException (__ ("File ' $ file' doesn't exist " ));
114
114
}
115
115
116
- if ($ driver instanceof Filesystem \ExtendedDriverInterface ) {
116
+ if ($ driver instanceof Filesystem \DriverInterface ) {
117
117
return $ driver ->getMetadata ($ file )['mimetype ' ];
118
118
}
119
119
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class MimeTest extends TestCase
56
56
protected function setUp (): void
57
57
{
58
58
$ this ->localDriverMock = $ this ->getMockForAbstractClass (Filesystem \DriverInterface::class);
59
- $ this ->remoteDriverMock = $ this ->getMockForAbstractClass (Filesystem \ExtendedDriverInterface ::class);
59
+ $ this ->remoteDriverMock = $ this ->getMockForAbstractClass (Filesystem \DriverInterface ::class);
60
60
61
61
$ this ->localDirectoryMock = $ this ->getMockForAbstractClass (Filesystem \Directory \WriteInterface::class);
62
62
$ this ->localDirectoryMock ->method ('getDriver ' )
Original file line number Diff line number Diff line change @@ -393,4 +393,31 @@ public function getRealPathSafety($path);
393
393
* @return mixed
394
394
*/
395
395
public function getRelativePath ($ basePath , $ path = null );
396
+
397
+ /**
398
+ * Retrieve file metadata.
399
+ *
400
+ * Implementation must return associative array with next keys:
401
+ *
402
+ * ```
403
+ * [
404
+ * 'path',
405
+ * 'dirname',
406
+ * 'basename',
407
+ * 'extension',
408
+ * 'filename',
409
+ * 'timestamp',
410
+ * 'size',
411
+ * 'mimetype',
412
+ * 'extra' => [
413
+ * 'image-width',
414
+ * 'image-height'
415
+ * ]
416
+ * ];
417
+ *
418
+ * @param string $path Absolute path to file
419
+ * @return array
420
+ * @throws FileSystemException
421
+ */
422
+ public function getMetadata (string $ path ): array ;
396
423
}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments