![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/module-store/Model/Config/Reader/Source/Initial/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Store\Model\Config\Reader\Source\Initial; use Magento\Framework\App\Config\Initial; use Magento\Framework\App\Config\Reader\Source\SourceInterface; use Magento\Framework\App\Config\Scope\Converter; use Magento\Framework\App\Config\ScopeConfigInterface; /** * Class for retrieving configuration from initial by default scope */ class DefaultScope implements SourceInterface { /** * @var Initial */ private $initialConfig; /** * @var Converter */ private $converter; /** * @param Initial $initialConfig * @param Converter $converter */ public function __construct( Initial $initialConfig, Converter $converter ) { $this->initialConfig = $initialConfig; $this->converter = $converter; } /** * Retrieve config by default scope * * @param string|null $scopeCode * @return array */ public function get($scopeCode = null) { return $this->converter->convert($this->initialConfig->getData(ScopeConfigInterface::SCOPE_TYPE_DEFAULT)); } }