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

Public Member Functions

 __construct (ServiceLocatorInterface $serviceLocator)
 
 create (\Magento\Framework\App\DeploymentConfig $deploymentConfig)
 

Protected Attributes

 $serviceLocator
 

Detailed Description

Definition at line 12 of file ResourceFactory.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( ServiceLocatorInterface  $serviceLocator)

Constructor

Parameters
ServiceLocatorInterface$serviceLocator

Definition at line 26 of file ResourceFactory.php.

27  {
28  $this->serviceLocator = $serviceLocator;
29  }

Member Function Documentation

◆ create()

create ( \Magento\Framework\App\DeploymentConfig  $deploymentConfig)
Parameters
\Magento\Framework\App\DeploymentConfig$deploymentConfig
Returns
Resource

Definition at line 35 of file ResourceFactory.php.

36  {
37  $connectionFactory = $this->serviceLocator->get(\Magento\Setup\Module\ConnectionFactory::class);
38  $resource = new ResourceConnection(
39  new ResourceConfig(),
40  $connectionFactory,
42  );
43  return $resource;
44  }
$resource
Definition: bulk.php:12
$deploymentConfig

Field Documentation

◆ $serviceLocator

$serviceLocator
protected

Definition at line 19 of file ResourceFactory.php.


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