mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-09-25 22:09:23 +02:00
22 lines
562 B
PHP
22 lines
562 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace DesignPatterns\Behavioral\ChainOfResponsibilities\Responsible;
|
|
|
|
use DesignPatterns\Behavioral\ChainOfResponsibilities\Handler;
|
|
use Psr\Http\Message\RequestInterface;
|
|
|
|
class SlowDatabaseHandler extends Handler
|
|
{
|
|
/**
|
|
* @param RequestInterface $request
|
|
*
|
|
* @return string|null
|
|
*/
|
|
protected function processing(RequestInterface $request)
|
|
{
|
|
// this is a mockup, in production code you would ask a slow (compared to in-memory) DB for the results
|
|
|
|
return 'Hello World!';
|
|
}
|
|
}
|