/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/Config/Scope.php
75 строк
1 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2014 Adobe * All Rights Reserved. */ 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; } }