SampleMiddleware.php 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  5. * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  6. *
  7. * Licensed under The MIT License
  8. * For full copyright and license information, please see the LICENSE.txt
  9. * Redistributions of files must retain the above copyright notice.
  10. *
  11. * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  12. * @link https://cakephp.org CakePHP(tm) Project
  13. * @since 3.3.0
  14. * @license https://opensource.org/licenses/mit-license.php MIT License
  15. */
  16. namespace TestApp\Middleware;
  17. use Psr\Http\Message\ResponseInterface;
  18. use Psr\Http\Message\ServerRequestInterface;
  19. use Psr\Http\Server\MiddlewareInterface;
  20. use Psr\Http\Server\RequestHandlerInterface;
  21. /**
  22. * Testing stub for middleware tests.
  23. */
  24. class SampleMiddleware implements MiddlewareInterface
  25. {
  26. public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
  27. {
  28. return $handler->handle($request);
  29. }
  30. }