DispatchProvider.php 1001 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Model;
  6. /**
  7. * Temando Dispatch Provider
  8. *
  9. * Registry for re-use of the same dispatch entity during one request cycle.
  10. *
  11. * @package Temando\Shipping\Model
  12. * @author Sebastian Ertner <sebastian.ertner@netresearch.de>
  13. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  14. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  15. * @link http://www.temando.com/
  16. */
  17. class DispatchProvider implements DispatchProviderInterface
  18. {
  19. /**
  20. * @var DispatchInterface
  21. */
  22. private $dispatch;
  23. /**
  24. * @return DispatchInterface
  25. */
  26. public function getDispatch()
  27. {
  28. return $this->dispatch;
  29. }
  30. /**
  31. * @param DispatchInterface $dispatch
  32. * @return void
  33. */
  34. public function setDispatch(DispatchInterface $dispatch)
  35. {
  36. $this->dispatch = $dispatch;
  37. }
  38. }