mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-05 06:27:25 +02:00
19 lines
482 B
PHP
19 lines
482 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
|
|
{
|
|
protected function processing(RequestInterface $request): ?string
|
|
{
|
|
// this is a mockup, in production code you would ask a slow (compared to in-memory) DB for the results
|
|
|
|
return 'Hello World!';
|
|
}
|
|
}
|