![]() 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/GraphQl/Schema/Type/Output/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\Framework\GraphQl\Schema\Type\Output; use Magento\Framework\GraphQl\Config\ConfigElementInterface; use Magento\Framework\GraphQl\Schema\Type\OutputTypeInterface; use Magento\Framework\GraphQl\Schema\Type\Output\ElementMapper\FormatterInterface; /** * Mapper of config element objects to the objects compatible with GraphQL schema generator. */ class ElementMapper { /** * @var FormatterInterface */ private $formatter; /** * @param FormatterInterface $formatter */ public function __construct(FormatterInterface $formatter) { $this->formatter = $formatter; } /** * Convert provided config element to the object compatible with GraphQL schema generator. * * @param \Magento\Framework\GraphQl\Config\ConfigElementInterface $configElement * @param OutputTypeInterface $outputType * @return array */ public function buildSchemaArray(ConfigElementInterface $configElement, OutputTypeInterface $outputType) : array { return $this->formatter->format($configElement, $outputType); } }