/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/App/ScopeResolver.php
54 строки
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 2017 Adobe * All Rights Reserved. */ namespace Magento\Framework\App; use Magento\Framework\ObjectManagerInterface; class ScopeResolver implements ScopeResolverInterface { /** * @var \Magento\Store\Model\StoreManagerInterface */ protected $objectManager; /** * @var ScopeInterface */ private $defaultScope; /** * ScopeResolver constructor * * @param ObjectManagerInterface $objectManager */ public function __construct(ObjectManagerInterface $objectManager) { $this->objectManager = $objectManager; } /** * {@inheritdoc} * @return ScopeDefault */ public function getScope($scopeId = null) { if (!$this->defaultScope) { $this->defaultScope = $this->objectManager->create(ScopeDefault::class); } return $this->defaultScope; } /** * Retrieve a list of available scopes * * @return ScopeInterface[] */ public function getScopes() { return [$this->defaultScope]; } }