add 'adding content' chapter

This commit is contained in:
lubiana 2022-04-05 19:09:40 +02:00
parent 71329a2af0
commit 2d9c2b256e
20 changed files with 884 additions and 251 deletions

View file

@ -2,18 +2,15 @@
namespace Lubian\NoFramework\Action;
use Lubian\NoFramework\Template\MarkdownParser;
use Psr\Http\Message\ResponseInterface;
final class Other
{
public function someFunctionName(ResponseInterface $response): ResponseInterface
public function someFunctionName(ResponseInterface $response, MarkdownParser $parser): ResponseInterface
{
$body = $response->getBody();
$body->write('This works too!');
return $response
->withStatus(200)
->withBody($body);
$html = $parser->parse('This *works* **too!**');
$response->getBody()->write($html);
return $response->withStatus(200);
}
}