BackupRollbackFactory.php 994 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Factory for Acl resource
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Framework\Setup;
  9. use Magento\Framework\ObjectManagerInterface;
  10. use Symfony\Component\Console\Output\OutputInterface;
  11. class BackupRollbackFactory
  12. {
  13. /**
  14. * @var ObjectManagerInterface
  15. */
  16. protected $_objectManager;
  17. /**
  18. * @param ObjectManagerInterface $objectManager
  19. */
  20. public function __construct(ObjectManagerInterface $objectManager)
  21. {
  22. $this->_objectManager = $objectManager;
  23. }
  24. /**
  25. * Create and return BackupRollback
  26. *
  27. * @param OutputInterface $output
  28. * @return BackupRollback
  29. */
  30. public function create($output)
  31. {
  32. $log = $this->_objectManager->create(\Magento\Framework\Setup\ConsoleLogger::class, ['output' => $output]);
  33. return $this->_objectManager->create(\Magento\Framework\Setup\BackupRollback::class, ['log' => $log]);
  34. }
  35. }