add 'adding content' chapter
This commit is contained in:
parent
71329a2af0
commit
2d9c2b256e
20 changed files with 884 additions and 251 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue