Context.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Setup\SampleData;
  7. use \Magento\Framework\File\Csv;
  8. /**
  9. * Constructor modification point for Magento\Framework\Setup\SampleData.
  10. *
  11. * All context classes were introduced to allow for backwards compatible constructor modifications
  12. * of classes that were supposed to be extended by extension developers.
  13. *
  14. * Do not call methods of this class directly.
  15. *
  16. * As Magento moves from inheritance-based APIs all such classes will be deprecated together with
  17. * the classes they were introduced for.
  18. */
  19. class Context
  20. {
  21. /**
  22. * @var FixtureManager
  23. */
  24. private $fixtureManager;
  25. /**
  26. * @var Csv
  27. */
  28. private $csvReader;
  29. /**
  30. * @param FixtureManager $fixtureManager
  31. * @param Csv $csvReader
  32. */
  33. public function __construct(FixtureManager $fixtureManager, Csv $csvReader)
  34. {
  35. $this->fixtureManager = $fixtureManager;
  36. $this->csvReader = $csvReader;
  37. }
  38. /**
  39. * @return FixtureManager
  40. */
  41. public function getFixtureManager()
  42. {
  43. return $this->fixtureManager;
  44. }
  45. /**
  46. * @return Csv
  47. */
  48. public function getCsvReader()
  49. {
  50. return $this->csvReader;
  51. }
  52. }