Reader.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\WebapiAsync\Model\ServiceConfig;
  8. /**
  9. * Service config data reader.
  10. */
  11. class Reader extends \Magento\Framework\Config\Reader\Filesystem
  12. {
  13. /**
  14. * List of id attributes for merge
  15. *
  16. * @var array
  17. */
  18. protected $_idAttributes = [
  19. '/services/service' => ['class', 'method'],
  20. '/services/route' => ['url', 'method']
  21. ];
  22. /**
  23. * @param \Magento\Framework\Config\FileResolverInterface $fileResolver
  24. * @param Converter $converter
  25. * @param SchemaLocator $schemaLocator
  26. * @param \Magento\Framework\Config\ValidationStateInterface $validationState
  27. * @param string $fileName
  28. * @param array $idAttributes
  29. * @param string $domDocumentClass
  30. * @param string $defaultScope
  31. */
  32. public function __construct(
  33. \Magento\Framework\Config\FileResolverInterface $fileResolver,
  34. Converter $converter,
  35. SchemaLocator $schemaLocator,
  36. \Magento\Framework\Config\ValidationStateInterface $validationState,
  37. $fileName = 'webapi_async.xml',
  38. $idAttributes = [],
  39. $domDocumentClass = \Magento\Framework\Config\Dom::class,
  40. $defaultScope = 'global'
  41. ) {
  42. parent::__construct(
  43. $fileResolver,
  44. $converter,
  45. $schemaLocator,
  46. $validationState,
  47. $fileName,
  48. $idAttributes,
  49. $domDocumentClass,
  50. $defaultScope
  51. );
  52. }
  53. }