@api
- Since
- 100.0.2
Definition at line 18 of file BackupFactory.php.
◆ __construct()
- Parameters
-
\Magento\Framework\ObjectManagerInterface | $objectManager | |
Definition at line 28 of file BackupFactory.php.
◆ create()
create |
( |
|
$timestamp, |
|
|
|
$type |
|
) |
| |
Load backup by it's type and creation timestamp
- Parameters
-
int | $timestamp | |
string | $type | |
- Returns
- \Magento\Backup\Model\Backup
Definition at line 40 of file BackupFactory.php.
42 $fsCollection = $this->_objectManager->create(\
Magento\Backup\Model\Fs\Collection::class);
43 $backupInstance = $this->_objectManager->create(\
Magento\Backup\Model\Backup::class);
45 foreach ($fsCollection as $backup) {
46 if ($backup->getTime() === (int) $timestamp && $backup->getType() ===
$type) {
47 $backupInstance->setData([
'id' => $backup->getId()])
48 ->setType($backup->getType())
49 ->setTime($backup->getTime())
50 ->setName($backup->getName())
51 ->setPath($backup->getPath());
56 return $backupInstance;
◆ $_objectManager
The documentation for this class was generated from the following file: