/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/Option/ArrayPool.php
42 строки
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\Option; /** * Array optioned object factory */ class ArrayPool { /** * @var \Magento\Framework\ObjectManagerInterface */ protected $_objectManager; /** * @param \Magento\Framework\ObjectManagerInterface $objectManager */ public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager) { $this->_objectManager = $objectManager; } /** * Get array optioned object * * @param string $model * @throws \InvalidArgumentException * @return \Magento\Framework\Data\OptionSourceInterface */ public function get($model) { $modelInstance = $this->_objectManager->get($model); if (false == $modelInstance instanceof \Magento\Framework\Data\OptionSourceInterface) { throw new \InvalidArgumentException($model . 'doesn\'t implement \Magento\Framework\Data\OptionSourceInterface'); } return $modelInstance; } }