|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
/* |
|
6
|
|
|
* Copyright Humbly Arrogant Ltd 2020-2022. |
|
7
|
|
|
* |
|
8
|
|
|
* Use of this software is governed by the Business Source License included in the LICENSE file and at https://getparthenon.com/docs/next/license. |
|
9
|
|
|
* |
|
10
|
|
|
* Change Date: TBD ( 3 years after 2.0.0 release ) |
|
11
|
|
|
* |
|
12
|
|
|
* On the date above, in accordance with the Business Source License, use of this software will be governed by the open source license specified in the LICENSE file. |
|
13
|
|
|
*/ |
|
14
|
|
|
|
|
15
|
|
|
namespace Parthenon\User\Repository; |
|
16
|
|
|
|
|
17
|
|
|
use Parthenon\Athena\ResultSet; |
|
18
|
|
|
use Parthenon\User\Entity\MemberInterface; |
|
19
|
|
|
use Parthenon\User\Entity\TeamInterface; |
|
20
|
|
|
|
|
21
|
|
|
class DummyTeamRepository implements TeamRepositoryInterface |
|
22
|
|
|
{ |
|
23
|
|
|
public function findById($id) |
|
24
|
|
|
{ |
|
25
|
|
|
// TODO: Implement findById() method. |
|
26
|
|
|
} |
|
27
|
|
|
|
|
28
|
|
|
public function save($entity) |
|
29
|
|
|
{ |
|
30
|
|
|
// TODO: Implement save() method. |
|
31
|
|
|
} |
|
32
|
|
|
|
|
33
|
|
|
public function getByMember(MemberInterface $member): TeamInterface |
|
34
|
|
|
{ |
|
35
|
|
|
return new class() implements TeamInterface { |
|
36
|
|
|
public function getId() |
|
37
|
|
|
{ |
|
38
|
|
|
return null; |
|
39
|
|
|
} |
|
40
|
|
|
|
|
41
|
|
|
public function addMember(MemberInterface $member): TeamInterface |
|
42
|
|
|
{ |
|
43
|
|
|
return $this; |
|
44
|
|
|
} |
|
45
|
|
|
|
|
46
|
|
|
public function hasMember(MemberInterface $member): bool |
|
47
|
|
|
{ |
|
48
|
|
|
return false; |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
public function getMembers(): array |
|
52
|
|
|
{ |
|
53
|
|
|
return []; |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
public function getTeamSize(): int |
|
57
|
|
|
{ |
|
58
|
|
|
return 0; |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
public function setCreatedAt(\DateTime $createdAt): TeamInterface |
|
62
|
|
|
{ |
|
63
|
|
|
return $this; |
|
64
|
|
|
} |
|
65
|
|
|
|
|
66
|
|
|
public function setName(?string $name) |
|
67
|
|
|
{ |
|
68
|
|
|
// TODO: Implement setName() method. |
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
public function getName(): ?string |
|
72
|
|
|
{ |
|
73
|
|
|
// TODO: Implement getName() method. |
|
74
|
|
|
} |
|
75
|
|
|
}; |
|
76
|
|
|
} |
|
77
|
|
|
|
|
78
|
|
|
public function getList(array $filters = [], string $sortKey = 'id', string $sortType = 'ASC', int $limit = self::LIMIT, $lastId = null): ResultSet |
|
79
|
|
|
{ |
|
80
|
|
|
return new ResultSet([], $sortKey, $sortType, $limit); |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
public function getById($id, $includeDeleted = false) |
|
84
|
|
|
{ |
|
85
|
|
|
// TODO: Implement getById() method. |
|
86
|
|
|
} |
|
87
|
|
|
|
|
88
|
|
|
public function delete($entity) |
|
89
|
|
|
{ |
|
90
|
|
|
// TODO: Implement delete() method. |
|
91
|
|
|
} |
|
92
|
|
|
|
|
93
|
|
|
public function undelete($entity) |
|
94
|
|
|
{ |
|
95
|
|
|
// TODO: Implement undelete() method. |
|
96
|
|
|
} |
|
97
|
|
|
} |
|
98
|
|
|
|