forked from cystbear/ForumBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTopicRepositoryInterface.php
More file actions
74 lines (65 loc) · 1.79 KB
/
Copy pathTopicRepositoryInterface.php
File metadata and controls
74 lines (65 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
namespace Herzult\Bundle\ForumBundle\Model;
interface TopicRepositoryInterface extends RepositoryInterface
{
/**
* Finds one topic by its category and its slug
*
* @param Category $category
* @paral string $slug
* @return Topic or NULL
**/
function findOneByCategoryAndSlug($category, $slug);
/**
* Finds one topic by its id
*
* @param integer $id
* @return Topic or NULL whether the specified id does not match any topic
*/
function findOneById($id);
/**
* Finds all topics ordered by their last pull date
*
* @param boolean $asPaginator Will return a Paginator instance if true
* @return array|Paginator
*/
function findAll($asPaginator);
/**
* Finds all topics matching to the specified Category ordered by their
* last pull date
*
* @param integer|Category $category
* @param boolean $asPaginator Will return a Paginator instance if true
* @return array|Paginator
*/
function findAllByCategory($category, $asPaginator);
/**
* Get topics which have the more recent last post
*
* @param int $number
* @return array of Topics
*/
function findLatestPosted($number);
/**
* Finds all topics matching the specified query ordered by their
* last pulled date
*
* @param string $query
* @param boolean $asPaginator Will return a Paginator instance if true
* @return array|Paginator
*/
function search($query, $asPaginator);
/**
* Increment the number of views of a topic
*
* @param Topic $topic
* @return void
*/
function incrementTopicNumViews($topic);
/**
* Creates a new post instance
*
* @return Topic
*/
function createNewTopic();
}