Reader.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Catalog\Model\Attribute\Config;
  7. /**
  8. * Loads catalog attributes configuration from multiple XML files by merging them together
  9. */
  10. class Reader extends \Magento\Framework\Config\Reader\Filesystem
  11. {
  12. /**
  13. * List of id attributes for merge
  14. *
  15. * @var array
  16. */
  17. protected $_idAttributes = ['/config/group' => 'name', '/config/group/attribute' => 'name'];
  18. /**
  19. * Construct the FileSystem Reader Class
  20. *
  21. * @param \Magento\Framework\Config\FileResolverInterface $fileResolver
  22. * @param Converter $converter
  23. * @param SchemaLocator $schemaLocator
  24. * @param \Magento\Framework\Config\ValidationStateInterface $validationState
  25. * @param string $fileName
  26. * @param array $idAttributes
  27. * @param string $domDocumentClass
  28. * @param string $defaultScope
  29. */
  30. public function __construct(
  31. \Magento\Framework\Config\FileResolverInterface $fileResolver,
  32. Converter $converter,
  33. SchemaLocator $schemaLocator,
  34. \Magento\Framework\Config\ValidationStateInterface $validationState,
  35. $fileName = 'catalog_attributes.xml',
  36. $idAttributes = [],
  37. $domDocumentClass = \Magento\Framework\Config\Dom::class,
  38. $defaultScope = 'global'
  39. ) {
  40. parent::__construct(
  41. $fileResolver,
  42. $converter,
  43. $schemaLocator,
  44. $validationState,
  45. $fileName,
  46. $idAttributes,
  47. $domDocumentClass,
  48. $defaultScope
  49. );
  50. }
  51. }