Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
InstallerFactory Class Reference

Public Member Functions

 __construct (ServiceLocatorInterface $serviceLocator, ResourceFactory $resourceFactory)
 
 create (LoggerInterface $log)
 

Protected Attributes

 $serviceLocator
 

Detailed Description

@SuppressWarnings(PHPMD.CouplingBetweenObjects)

Definition at line 17 of file InstallerFactory.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( ServiceLocatorInterface  $serviceLocator,
ResourceFactory  $resourceFactory 
)

Constructor

Parameters
ServiceLocatorInterface$serviceLocator
ResourceFactory$resourceFactory

Definition at line 37 of file InstallerFactory.php.

40  {
41  $this->serviceLocator = $serviceLocator;
42  $this->resourceFactory = $resourceFactory;
43  // For Setup Wizard we are using our customized error handler
44  $handler = new ErrorHandler();
45  set_error_handler([$handler, 'handler']);
46  }
catch(\Exception $e) $handler
Definition: index.php:30

Member Function Documentation

◆ create()

create ( LoggerInterface  $log)

Factory method for installer object

Parameters
LoggerInterface$log
Returns
Installer

Definition at line 54 of file InstallerFactory.php.

55  {
56  return new Installer(
57  $this->serviceLocator->get(\Magento\Framework\Setup\FilePermissions::class),
58  $this->serviceLocator->get(\Magento\Framework\App\DeploymentConfig\Writer::class),
59  $this->serviceLocator->get(\Magento\Framework\App\DeploymentConfig\Reader::class),
60  $this->serviceLocator->get(\Magento\Framework\App\DeploymentConfig::class),
61  $this->serviceLocator->get(\Magento\Framework\Module\ModuleList::class),
62  $this->serviceLocator->get(\Magento\Framework\Module\ModuleList\Loader::class),
63  $this->serviceLocator->get(\Magento\Setup\Model\AdminAccountFactory::class),
64  $log,
65  $this->serviceLocator->get(\Magento\Setup\Module\ConnectionFactory::class),
66  $this->serviceLocator->get(\Magento\Framework\App\MaintenanceMode::class),
67  $this->serviceLocator->get(\Magento\Framework\Filesystem::class),
68  $this->serviceLocator->get(\Magento\Setup\Model\ObjectManagerProvider::class),
69  new \Magento\Framework\Model\ResourceModel\Db\Context(
70  $this->getResource(),
71  $this->serviceLocator->get(\Magento\Framework\Model\ResourceModel\Db\TransactionManager::class),
72  $this->serviceLocator->get(\Magento\Framework\Model\ResourceModel\Db\ObjectRelationProcessor::class)
73  ),
74  $this->serviceLocator->get(\Magento\Setup\Model\ConfigModel::class),
75  $this->serviceLocator->get(\Magento\Framework\App\State\CleanupFiles::class),
76  $this->serviceLocator->get(\Magento\Setup\Validator\DbValidator::class),
77  $this->serviceLocator->get(\Magento\Setup\Module\SetupFactory::class),
78  $this->serviceLocator->get(\Magento\Setup\Module\DataSetupFactory::class),
79  $this->serviceLocator->get(\Magento\Framework\Setup\SampleData\State::class),
80  new \Magento\Framework\Component\ComponentRegistrar(),
81  $this->serviceLocator->get(\Magento\Setup\Model\PhpReadinessCheck::class)
82  );
83  }

Field Documentation

◆ $serviceLocator

$serviceLocator
protected

Definition at line 24 of file InstallerFactory.php.


The documentation for this class was generated from the following file: