ComponentFile.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Component;
  7. /**
  8. * Value-object for files found in components
  9. */
  10. class ComponentFile
  11. {
  12. /**
  13. * Component type
  14. *
  15. * @var string
  16. */
  17. private $componentType;
  18. /**
  19. * Component name
  20. *
  21. * @var string
  22. */
  23. private $componentName;
  24. /**
  25. * Full path
  26. *
  27. * @var string
  28. */
  29. private $path;
  30. /**
  31. * Constructor
  32. *
  33. * @param string $componentType
  34. * @param string $componentName
  35. * @param string $fullPath
  36. */
  37. public function __construct($componentType, $componentName, $fullPath)
  38. {
  39. $this->componentType = $componentType;
  40. $this->componentName = $componentName;
  41. $this->path = $fullPath;
  42. }
  43. /**
  44. * Get component type
  45. *
  46. * @return string
  47. */
  48. public function getComponentType()
  49. {
  50. return $this->componentType;
  51. }
  52. /**
  53. * Get component name
  54. *
  55. * @return string
  56. */
  57. public function getComponentName()
  58. {
  59. return $this->componentName;
  60. }
  61. /**
  62. * Get full path to the component
  63. *
  64. * @return string
  65. */
  66. public function getFullPath()
  67. {
  68. return $this->path;
  69. }
  70. }