1 | <?php |
||
18 | class Rooms |
||
19 | { |
||
20 | const ACTION_TYPE_LEAVE = 'leave'; |
||
21 | const ACTION_TYPE_DELETE = 'delete'; |
||
22 | |||
23 | /** |
||
24 | * @var ClientInterface |
||
25 | */ |
||
26 | private $client; |
||
27 | |||
28 | /** |
||
29 | * @var RoomFactory |
||
30 | */ |
||
31 | private $factory; |
||
32 | |||
33 | /** |
||
34 | * Rooms constructor. |
||
35 | * |
||
36 | * @param ClientInterface $client |
||
37 | * @param RoomFactory $factory |
||
38 | */ |
||
39 | public function __construct(ClientInterface $client, RoomFactory $factory) |
||
44 | |||
45 | /** |
||
46 | * 自分のチャット一覧の取得. |
||
47 | * |
||
48 | * @return CollectionInterface |
||
49 | */ |
||
50 | public function show() |
||
56 | |||
57 | /** |
||
58 | * @param $id |
||
59 | * |
||
60 | * @return Room |
||
61 | */ |
||
62 | public function detail($id) |
||
68 | |||
69 | /** |
||
70 | * グループチャットを新規作成. |
||
71 | * |
||
72 | * @param Room $room |
||
73 | * @param MemberCollection $members |
||
74 | * |
||
75 | * @return Room |
||
76 | */ |
||
77 | public function create(Room $room, MemberCollection $members) |
||
90 | |||
91 | /** |
||
92 | * チャットの名前、アイコンをアップデート. |
||
93 | * |
||
94 | * @param Room $room |
||
95 | */ |
||
96 | public function update(Room $room) |
||
103 | |||
104 | /** |
||
105 | * グループチャットを退席/削除する. |
||
106 | * |
||
107 | * @param Room $room |
||
108 | * @param string $actionType leave or delete |
||
109 | * |
||
110 | * @throws InvalidArgumentException |
||
111 | */ |
||
112 | public function remove(Room $room, $actionType) |
||
125 | |||
126 | /** |
||
127 | * @param $roomId |
||
128 | * |
||
129 | * @return Rooms\Members |
||
130 | */ |
||
131 | public function members(int $roomId) |
||
135 | |||
136 | /** |
||
137 | * @param $roomId |
||
138 | * |
||
139 | * @return Rooms\Messages |
||
140 | */ |
||
141 | public function messages(int $roomId) |
||
145 | |||
146 | /** |
||
147 | * @param $roomId |
||
148 | * |
||
149 | * @return Rooms\Tasks |
||
150 | */ |
||
151 | public function tasks(int $roomId) |
||
155 | |||
156 | /** |
||
157 | * @param int $roomId |
||
158 | * |
||
159 | * @return Rooms\Files |
||
160 | */ |
||
161 | public function files(int $roomId) |
||
165 | } |
||
166 |