/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
setup/src/Magento/Setup/Module/ResourceFactory.php
51 строка
1 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 11:23
22 окт 2025, 11:23
6c2f6e6
Код
Авторство
О чём код?
<?php /** * Copyright 2015 Adobe * All Rights Reserved. */ namespace Magento\Setup\Module; use Laminas\ServiceManager\ServiceLocatorInterface; use Magento\Framework\App\DeploymentConfig; use Magento\Framework\App\ResourceConnection; use Magento\Setup\Module\Setup\ResourceConfig; /** * Factory for Magento\Framework\App\ResourceConnection */ class ResourceFactory { /** * Laminas Framework's service locator * * @var ServiceLocatorInterface */ protected $serviceLocator; /** * @param ServiceLocatorInterface $serviceLocator */ public function __construct(ServiceLocatorInterface $serviceLocator) { $this->serviceLocator = $serviceLocator; } /** * Create object * * @param DeploymentConfig $deploymentConfig * @return ResourceConnection */ public function create(DeploymentConfig $deploymentConfig) { $connectionFactory = $this->serviceLocator->get(ConnectionFactory::class); $resource = new ResourceConnection( new ResourceConfig(), $connectionFactory, $deploymentConfig ); return $resource; } }