From a7cdb37de272af41bb170a0f7c2edc56d22516ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= <postmaster@greg0ire.fr> Date: Fri, 23 Mar 2018 22:47:56 +0100 Subject: [PATCH] Add slide about fat repositories --- index.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/index.md b/index.md index bc54cd8..a03256c 100644 --- a/index.md +++ b/index.md @@ -374,6 +374,22 @@ coup… slide suivant $repository = $entityManager->getRepository(Article::class); ``` +--- +## Les repositories, ça peut grossir + +```php +interface ArticleRepository +{ + public function latestArticles(int size): iterable; + public function mostReadArticles(int size): iterable; + public function mostCommentedArticles(int size): iterable; + public function byTopic(ArticleTopic $topic): iterable; + public function findRelated(Article $article): iterable; + + // more and more methods… +} +``` + --- ## Les Query functions -- GitLab