/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
pub/errors/processorFactory.php
37 строк
1 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 11:23
22 окт 2025, 11:23
6c2f6e6
Код
Авторство
О чём код?
<?php /** * Copyright 2015 Adobe * All Rights Reserved. */ // phpcs:disable PSR1.Files.SideEffects namespace Magento\Framework\Error; // phpcs:ignore Magento2.Functions.DiscouragedFunction,Magento2.Security.IncludeFile require_once realpath(__DIR__) . '/../../app/bootstrap.php'; require_once 'processor.php'; // phpcs:ignore Magento2.Security.IncludeFile use Magento\Framework\App\ObjectManager as AppObjectManager; /** * Error processor factory */ class ProcessorFactory { /** * Create Processor * * @return Processor */ public function createProcessor() { try { $objectManager = AppObjectManager::getInstance(); return $objectManager->create(Processor::class); } catch (\RuntimeException $exception) { // phpcs:ignore Magento2.Security.Superglobal $objectManagerFactory = \Magento\Framework\App\Bootstrap::createObjectManagerFactory(BP, $_SERVER); $objectManager = $objectManagerFactory->create($_SERVER); // phpcs:ignore Magento2.Security.Superglobal $response = $objectManager->create(\Magento\Framework\App\Response\Http::class); return new Processor($response); } } }