|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct (\Magento\Framework\Filesystem $filesystem, \Magento\MediaStorage\Helper\File\Storage\Database $fileStorageDatabase, \Magento\MediaStorage\Model\File\Storage\DatabaseFactory $storageDatabaseFactory, \Magento\Framework\App\Response\Http\FileFactory $fileFactory, $rootDirBasePath=DirectoryList::MEDIA) | |
| downloadFile ($info) | |
Protected Member Functions | |
| _isCanProcessed ($relativePath) | |
| _processDatabaseFile ($filePath, $relativePath) | |
Protected Attributes | |
| $_rootDir | |
| $_fileStorageDatabase | |
| $_storageDatabaseFactory | |
| $_fileFactory | |
| $rootDirBasePath | |
Class Download. Represents download logic for files
Definition at line 14 of file Download.php.
| __construct | ( | \Magento\Framework\Filesystem | $filesystem, |
| \Magento\MediaStorage\Helper\File\Storage\Database | $fileStorageDatabase, | ||
| \Magento\MediaStorage\Model\File\Storage\DatabaseFactory | $storageDatabaseFactory, | ||
| \Magento\Framework\App\Response\Http\FileFactory | $fileFactory, | ||
$rootDirBasePath = DirectoryList::MEDIA |
|||
| ) |
Constructor method
| \Magento\Framework\Filesystem | $filesystem | |
| \Magento\MediaStorage\Helper\File\Storage\Database | $fileStorageDatabase | |
| \Magento\MediaStorage\Model\File\Storage\DatabaseFactory | $storageDatabaseFactory | |
| \Magento\Framework\App\Response\Http\FileFactory | $fileFactory | |
| string | $rootDirBasePath |
Definition at line 50 of file Download.php.
|
protected |
Method checks, if file can be returned depends on the given filepath
| string | $relativePath |
Definition at line 97 of file Download.php.
|
protected |
Check file in database storage if needed and place it on file system
| string | $filePath | |
| string | $relativePath |
Definition at line 113 of file Download.php.
| downloadFile | ( | $info | ) |
Custom options downloader
| array | $info |
Definition at line 71 of file Download.php.
|
protected |
Definition at line 34 of file Download.php.
|
protected |
Definition at line 24 of file Download.php.
|
protected |
Definition at line 19 of file Download.php.
|
protected |
Definition at line 29 of file Download.php.
|
protected |
Definition at line 39 of file Download.php.