mirror of
https://github.com/doctrine/doctrine-website.git
synced 2026-03-23 22:32:11 +01:00
Maintaining a standalone static website generator project that is not reused outside our website adds maintenance overhead. For instance, support for using `phpdocumentor/guides` was implemented in the website repo rather than the standalone generator package, which was still using the `doctrine/rst-parser` package that we want to abandon.
26 lines
598 B
PHP
26 lines
598 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Doctrine\Website\Controllers;
|
|
|
|
use Doctrine\Website\Model\BlogPost;
|
|
use Doctrine\Website\Repositories\BlogPostRepository;
|
|
use Doctrine\Website\StaticGenerator\Controller\Response;
|
|
|
|
final readonly class AtomController
|
|
{
|
|
/** @param BlogPostRepository<BlogPost> $blogPostRepository */
|
|
public function __construct(
|
|
private BlogPostRepository $blogPostRepository,
|
|
) {
|
|
}
|
|
|
|
public function index(): Response
|
|
{
|
|
return new Response([
|
|
'blogPosts' => $this->blogPostRepository->findPaginated(),
|
|
]);
|
|
}
|
|
}
|