1 | <?php namespace jlourenco\blog; |
||
6 | class Blog |
||
7 | { |
||
8 | |||
9 | /** |
||
10 | * The Post repository. |
||
11 | * |
||
12 | * @var \jlourenco\blog\Repositories\BlogPostRepositoryInterface |
||
13 | */ |
||
14 | protected $posts; |
||
15 | |||
16 | /** |
||
17 | * The Category repository. |
||
18 | * |
||
19 | * @var \jlourenco\blog\Repositories\BlogCategoryRepositoryInterface |
||
20 | */ |
||
21 | protected $categories; |
||
22 | |||
23 | /** |
||
24 | * Create a new Blog instance. |
||
25 | * |
||
26 | * @param \jlourenco\blog\Repositories\BlogPostRepositoryInterface $posts |
||
27 | * @param \jlourenco\blog\Repositories\BlogCategoryRepositoryInterface $categories |
||
28 | */ |
||
29 | public function __construct(BlogPostRepositoryInterface $posts, BlogCategoryRepositoryInterface $categories) |
||
34 | |||
35 | /** |
||
36 | * Returns the posts repository. |
||
37 | *c |
||
38 | * @return \jlourenco\blog\Repositories\BlogPostRepositoryInterface |
||
39 | */ |
||
40 | public function getPostsRepository() |
||
44 | |||
45 | /** |
||
46 | * Sets the posts repository. |
||
47 | * |
||
48 | * @param \jlourenco\blog\Repositories\BlogPostRepositoryInterface $posts |
||
49 | * @return void |
||
50 | */ |
||
51 | public function setPostsRepository(BlogPostRepositoryInterface $posts) |
||
55 | |||
56 | /** |
||
57 | * Returns the categories repository. |
||
58 | *c |
||
59 | * @return \jlourenco\blog\Repositories\BlogCategoryRepositoryInterface |
||
60 | */ |
||
61 | public function getCategoriesRepository() |
||
65 | |||
66 | /** |
||
67 | * Sets the categories repository. |
||
68 | * |
||
69 | * @param \jlourenco\blog\Repositories\BlogCategoryRepositoryInterface $categories |
||
70 | * @return void |
||
71 | */ |
||
72 | public function setCategoriesRepository(BlogCategoryRepositoryInterface $categories) |
||
76 | |||
77 | } |
||
78 |