add data from work folder
This commit is contained in:
parent
1781a923b4
commit
ca40fdd970
218 changed files with 16123 additions and 1233 deletions
23
implementation/10-invoker/src/Action/Hello.php
Normal file
23
implementation/10-invoker/src/Action/Hello.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Lubian\NoFramework\Action;
|
||||
|
||||
use Lubian\NoFramework\Service\Time\Now;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
final class Hello
|
||||
{
|
||||
public function __invoke(
|
||||
ResponseInterface $response,
|
||||
Now $now,
|
||||
string $name = 'Stranger',
|
||||
): ResponseInterface {
|
||||
$response = $response->withStatus(200);
|
||||
$response->getBody()->write('Hello ' . $name . '!');
|
||||
$nowString = $now->get()->format('H:i:s');
|
||||
$response->getBody()->write(' The Time is ' . $nowString);
|
||||
return $response;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue