Forward.php 790 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Forward action class
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Framework\App\Action;
  9. use Magento\Framework\App\RequestInterface;
  10. use Magento\Framework\App\ResponseInterface;
  11. /**
  12. * Forward request further.
  13. *
  14. * @SuppressWarnings(PHPMD.AllPurposeAction)
  15. */
  16. class Forward extends AbstractAction
  17. {
  18. /**
  19. * @param RequestInterface $request
  20. * @return ResponseInterface
  21. * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  22. */
  23. public function dispatch(RequestInterface $request)
  24. {
  25. return $this->execute();
  26. }
  27. /**
  28. * @inheritdoc
  29. */
  30. public function execute()
  31. {
  32. $this->_request->setDispatched(false);
  33. return $this->_response;
  34. }
  35. }