/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/TestServiceResolver.php
41 строка
816 B
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 10:44
22 окт 2025, 10:44
264bea2
Код
Авторство
О чём код?
<?php /** * Copyright 2023 Adobe * All Rights Reserved. */ declare(strict_types=1); namespace Magento\TestModuleGraphQlBackpressure\Model; use Magento\Framework\GraphQl\Config\Element\Field; use Magento\Framework\GraphQl\Query\ResolverInterface; use Magento\Framework\GraphQl\Schema\Type\ResolveInfo; class TestServiceResolver implements ResolverInterface { /** * @var int */ private int $counter = 0; /** * @inheritDoc */ public function resolve(Field $field, $context, ResolveInfo $info, ?array $value = null, ?array $args = null) { $this->counter++; return ['str' => 'read']; } public function resetCounter(): void { $this->counter = 0; } public function getCounter(): int { return $this->counter; } }