![]() 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/framework/Config/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Framework\Config; use Magento\Framework\App\AreaList; /** * Scope config */ class Scope implements ScopeInterface, ScopeListInterface { /** * Current config scope * * @var string */ protected $_currentScope; /** * List of all available areas * * @var AreaList */ protected $_areaList; /** * Constructor * * @param AreaList $areaList * @param string $defaultScope */ public function __construct(AreaList $areaList, $defaultScope = 'primary') { $this->_currentScope = $defaultScope; $this->_areaList = $areaList; } /** * Get current configuration scope identifier * * @return string */ public function getCurrentScope() { return $this->_currentScope; } /** * Set current configuration scope * * @param string $scope * @return void */ public function setCurrentScope($scope) { $this->_currentScope = $scope; } /** * Retrieve list of available config scopes * * @return string[] */ public function getAllScopes() { $codes = $this->_areaList->getCodes(); array_unshift($codes, 'global'); array_unshift($codes, 'primary'); return $codes; } }