@@ -2,93 +2,93 @@ |
||
2 | 2 | |
3 | 3 | interface BaseRepositoryInterface |
4 | 4 | { |
5 | - /** |
|
6 | - * Fetch all records with relations from the storage. |
|
7 | - * |
|
8 | - * @param array $relations |
|
9 | - * @param array $sortBy |
|
10 | - * @param array $desc |
|
11 | - * @param array $columns |
|
12 | - * @return collection |
|
13 | - */ |
|
14 | - public function all($relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
5 | + /** |
|
6 | + * Fetch all records with relations from the storage. |
|
7 | + * |
|
8 | + * @param array $relations |
|
9 | + * @param array $sortBy |
|
10 | + * @param array $desc |
|
11 | + * @param array $columns |
|
12 | + * @return collection |
|
13 | + */ |
|
14 | + public function all($relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
15 | 15 | |
16 | - /** |
|
17 | - * Fetch all records with relations from storage in pages. |
|
18 | - * |
|
19 | - * @param integer $perPage |
|
20 | - * @param array $relations |
|
21 | - * @param array $sortBy |
|
22 | - * @param array $desc |
|
23 | - * @param array $columns |
|
24 | - * @return collection |
|
25 | - */ |
|
26 | - public function paginate($perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
16 | + /** |
|
17 | + * Fetch all records with relations from storage in pages. |
|
18 | + * |
|
19 | + * @param integer $perPage |
|
20 | + * @param array $relations |
|
21 | + * @param array $sortBy |
|
22 | + * @param array $desc |
|
23 | + * @param array $columns |
|
24 | + * @return collection |
|
25 | + */ |
|
26 | + public function paginate($perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
27 | 27 | |
28 | - /** |
|
29 | - * Fetch all records with relations based on |
|
30 | - * the given condition from storage in pages. |
|
31 | - * |
|
32 | - * @param array $conditions array of conditions |
|
33 | - * @param integer $perPage |
|
34 | - * @param array $relations |
|
35 | - * @param array $sortBy |
|
36 | - * @param array $desc |
|
37 | - * @param array $columns |
|
38 | - * @return collection |
|
39 | - */ |
|
40 | - public function paginateBy($conditions, $perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
28 | + /** |
|
29 | + * Fetch all records with relations based on |
|
30 | + * the given condition from storage in pages. |
|
31 | + * |
|
32 | + * @param array $conditions array of conditions |
|
33 | + * @param integer $perPage |
|
34 | + * @param array $relations |
|
35 | + * @param array $sortBy |
|
36 | + * @param array $desc |
|
37 | + * @param array $columns |
|
38 | + * @return collection |
|
39 | + */ |
|
40 | + public function paginateBy($conditions, $perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
41 | 41 | |
42 | - /** |
|
43 | - * Save the given model/models to the storage. |
|
44 | - * |
|
45 | - * @param array $data |
|
46 | - * @return mixed |
|
47 | - */ |
|
48 | - public function save(array $data); |
|
42 | + /** |
|
43 | + * Save the given model/models to the storage. |
|
44 | + * |
|
45 | + * @param array $data |
|
46 | + * @return mixed |
|
47 | + */ |
|
48 | + public function save(array $data); |
|
49 | 49 | |
50 | - /** |
|
51 | - * Delete record from the storage based on the given |
|
52 | - * condition. |
|
53 | - * |
|
54 | - * @param var $value condition value |
|
55 | - * @param string $attribute condition column name |
|
56 | - * @return integer affected rows |
|
57 | - */ |
|
58 | - public function delete($value, $attribute = 'id'); |
|
50 | + /** |
|
51 | + * Delete record from the storage based on the given |
|
52 | + * condition. |
|
53 | + * |
|
54 | + * @param var $value condition value |
|
55 | + * @param string $attribute condition column name |
|
56 | + * @return integer affected rows |
|
57 | + */ |
|
58 | + public function delete($value, $attribute = 'id'); |
|
59 | 59 | |
60 | - /** |
|
61 | - * Fetch records from the storage based on the given |
|
62 | - * id. |
|
63 | - * |
|
64 | - * @param integer $id |
|
65 | - * @param array $relations |
|
66 | - * @param array $columns |
|
67 | - * @return object |
|
68 | - */ |
|
69 | - public function find($id, $relations = [], $columns = ['*']); |
|
60 | + /** |
|
61 | + * Fetch records from the storage based on the given |
|
62 | + * id. |
|
63 | + * |
|
64 | + * @param integer $id |
|
65 | + * @param array $relations |
|
66 | + * @param array $columns |
|
67 | + * @return object |
|
68 | + */ |
|
69 | + public function find($id, $relations = [], $columns = ['*']); |
|
70 | 70 | |
71 | - /** |
|
72 | - * Fetch records from the storage based on the given |
|
73 | - * condition. |
|
74 | - * |
|
75 | - * @param array $conditions array of conditions |
|
76 | - * @param array $relations |
|
77 | - * @param array $sortBy |
|
78 | - * @param array $desc |
|
79 | - * @param array $columns |
|
80 | - * @return collection |
|
81 | - */ |
|
82 | - public function findBy($conditions, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
71 | + /** |
|
72 | + * Fetch records from the storage based on the given |
|
73 | + * condition. |
|
74 | + * |
|
75 | + * @param array $conditions array of conditions |
|
76 | + * @param array $relations |
|
77 | + * @param array $sortBy |
|
78 | + * @param array $desc |
|
79 | + * @param array $columns |
|
80 | + * @return collection |
|
81 | + */ |
|
82 | + public function findBy($conditions, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
83 | 83 | |
84 | - /** |
|
85 | - * Fetch the first record fro the storage based on the given |
|
86 | - * condition. |
|
87 | - * |
|
88 | - * @param array $conditions array of conditions |
|
89 | - * @param array $relations |
|
90 | - * @param array $columns |
|
91 | - * @return object |
|
92 | - */ |
|
93 | - public function first($conditions, $relations = [], $columns = ['*']); |
|
84 | + /** |
|
85 | + * Fetch the first record fro the storage based on the given |
|
86 | + * condition. |
|
87 | + * |
|
88 | + * @param array $conditions array of conditions |
|
89 | + * @param array $relations |
|
90 | + * @param array $columns |
|
91 | + * @return object |
|
92 | + */ |
|
93 | + public function first($conditions, $relations = [], $columns = ['*']); |
|
94 | 94 | } |
@@ -2,93 +2,93 @@ |
||
2 | 2 | |
3 | 3 | interface BaseServiceInterface |
4 | 4 | { |
5 | - /** |
|
6 | - * Fetch all records with relations from the storage. |
|
7 | - * |
|
8 | - * @param array $relations |
|
9 | - * @param array $sortBy |
|
10 | - * @param array $desc |
|
11 | - * @param array $columns |
|
12 | - * @return collection |
|
13 | - */ |
|
14 | - public function all($relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
5 | + /** |
|
6 | + * Fetch all records with relations from the storage. |
|
7 | + * |
|
8 | + * @param array $relations |
|
9 | + * @param array $sortBy |
|
10 | + * @param array $desc |
|
11 | + * @param array $columns |
|
12 | + * @return collection |
|
13 | + */ |
|
14 | + public function all($relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
15 | 15 | |
16 | - /** |
|
17 | - * Fetch all records with relations from storage in pages. |
|
18 | - * |
|
19 | - * @param integer $perPage |
|
20 | - * @param array $relations |
|
21 | - * @param array $sortBy |
|
22 | - * @param array $desc |
|
23 | - * @param array $columns |
|
24 | - * @return collection |
|
25 | - */ |
|
26 | - public function paginate($perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
16 | + /** |
|
17 | + * Fetch all records with relations from storage in pages. |
|
18 | + * |
|
19 | + * @param integer $perPage |
|
20 | + * @param array $relations |
|
21 | + * @param array $sortBy |
|
22 | + * @param array $desc |
|
23 | + * @param array $columns |
|
24 | + * @return collection |
|
25 | + */ |
|
26 | + public function paginate($perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
27 | 27 | |
28 | - /** |
|
29 | - * Fetch all records with relations based on |
|
30 | - * the given condition from storage in pages. |
|
31 | - * |
|
32 | - * @param array $conditions array of conditions |
|
33 | - * @param integer $perPage |
|
34 | - * @param array $relations |
|
35 | - * @param array $sortBy |
|
36 | - * @param array $desc |
|
37 | - * @param array $columns |
|
38 | - * @return collection |
|
39 | - */ |
|
40 | - public function paginateBy($conditions, $perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
28 | + /** |
|
29 | + * Fetch all records with relations based on |
|
30 | + * the given condition from storage in pages. |
|
31 | + * |
|
32 | + * @param array $conditions array of conditions |
|
33 | + * @param integer $perPage |
|
34 | + * @param array $relations |
|
35 | + * @param array $sortBy |
|
36 | + * @param array $desc |
|
37 | + * @param array $columns |
|
38 | + * @return collection |
|
39 | + */ |
|
40 | + public function paginateBy($conditions, $perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
41 | 41 | |
42 | - /** |
|
43 | - * Save the given model/models to the storage. |
|
44 | - * |
|
45 | - * @param array $data |
|
46 | - * @return mixed |
|
47 | - */ |
|
48 | - public function save(array $data); |
|
42 | + /** |
|
43 | + * Save the given model/models to the storage. |
|
44 | + * |
|
45 | + * @param array $data |
|
46 | + * @return mixed |
|
47 | + */ |
|
48 | + public function save(array $data); |
|
49 | 49 | |
50 | - /** |
|
51 | - * Delete record from the storage based on the given |
|
52 | - * condition. |
|
53 | - * |
|
54 | - * @param var $value condition value |
|
55 | - * @param string $attribute condition column name |
|
56 | - * @return integer affected rows |
|
57 | - */ |
|
58 | - public function delete($value, $attribute = 'id'); |
|
50 | + /** |
|
51 | + * Delete record from the storage based on the given |
|
52 | + * condition. |
|
53 | + * |
|
54 | + * @param var $value condition value |
|
55 | + * @param string $attribute condition column name |
|
56 | + * @return integer affected rows |
|
57 | + */ |
|
58 | + public function delete($value, $attribute = 'id'); |
|
59 | 59 | |
60 | - /** |
|
61 | - * Fetch records from the storage based on the given |
|
62 | - * id. |
|
63 | - * |
|
64 | - * @param integer $id |
|
65 | - * @param array $relations |
|
66 | - * @param array $columns |
|
67 | - * @return object |
|
68 | - */ |
|
69 | - public function find($id, $relations = [], $columns = ['*']); |
|
60 | + /** |
|
61 | + * Fetch records from the storage based on the given |
|
62 | + * id. |
|
63 | + * |
|
64 | + * @param integer $id |
|
65 | + * @param array $relations |
|
66 | + * @param array $columns |
|
67 | + * @return object |
|
68 | + */ |
|
69 | + public function find($id, $relations = [], $columns = ['*']); |
|
70 | 70 | |
71 | - /** |
|
72 | - * Fetch records from the storage based on the given |
|
73 | - * condition. |
|
74 | - * |
|
75 | - * @param array $conditions array of conditions |
|
76 | - * @param array $relations |
|
77 | - * @param array $sortBy |
|
78 | - * @param array $desc |
|
79 | - * @param array $columns |
|
80 | - * @return collection |
|
81 | - */ |
|
82 | - public function findBy($conditions, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
71 | + /** |
|
72 | + * Fetch records from the storage based on the given |
|
73 | + * condition. |
|
74 | + * |
|
75 | + * @param array $conditions array of conditions |
|
76 | + * @param array $relations |
|
77 | + * @param array $sortBy |
|
78 | + * @param array $desc |
|
79 | + * @param array $columns |
|
80 | + * @return collection |
|
81 | + */ |
|
82 | + public function findBy($conditions, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']); |
|
83 | 83 | |
84 | - /** |
|
85 | - * Fetch the first record fro the storage based on the given |
|
86 | - * condition. |
|
87 | - * |
|
88 | - * @param array $conditions array of conditions |
|
89 | - * @param array $relations |
|
90 | - * @param array $columns |
|
91 | - * @return object |
|
92 | - */ |
|
93 | - public function first($conditions, $relations = [], $columns = ['*']); |
|
84 | + /** |
|
85 | + * Fetch the first record fro the storage based on the given |
|
86 | + * condition. |
|
87 | + * |
|
88 | + * @param array $conditions array of conditions |
|
89 | + * @param array $relations |
|
90 | + * @param array $columns |
|
91 | + * @return object |
|
92 | + */ |
|
93 | + public function first($conditions, $relations = [], $columns = ['*']); |
|
94 | 94 | } |