1 | <?php |
||
38 | class Driver |
||
39 | { |
||
40 | /** |
||
41 | * Default options of the Driver |
||
42 | * |
||
43 | * @var array |
||
44 | */ |
||
45 | private $defaultOptions = [ |
||
46 | 'scheme' => 'https', |
||
47 | 'basePath' => '/api/v4', |
||
48 | 'url' => 'localhost', |
||
49 | 'login_id' => null, |
||
50 | 'password' => null, |
||
51 | ]; |
||
52 | |||
53 | /** |
||
54 | * @var Container |
||
55 | */ |
||
56 | private $container; |
||
57 | |||
58 | /** |
||
59 | * @var array |
||
60 | */ |
||
61 | private $models = []; |
||
62 | |||
63 | /** |
||
64 | * Driver constructor. |
||
65 | * |
||
66 | * @param Container $container |
||
67 | */ |
||
68 | public function __construct(Container $container) |
||
79 | |||
80 | /** |
||
81 | * @return \Psr\Http\Message\ResponseInterface |
||
82 | */ |
||
83 | public function authenticate() |
||
100 | |||
101 | private function getModel($className) |
||
109 | |||
110 | /** |
||
111 | * @return UserModel |
||
112 | */ |
||
113 | public function getUserModel() |
||
117 | |||
118 | /** |
||
119 | * @return TeamModel |
||
120 | */ |
||
121 | public function getTeamModel() |
||
125 | |||
126 | /** |
||
127 | * @return ChannelModel |
||
128 | */ |
||
129 | public function getChannelModel() |
||
133 | |||
134 | /** |
||
135 | * @return PostModel |
||
136 | */ |
||
137 | public function getPostModel() |
||
141 | |||
142 | /** |
||
143 | * @return FileModel |
||
144 | */ |
||
145 | public function getFileModel() |
||
149 | |||
150 | /** |
||
151 | * @param $userId |
||
152 | * @return PreferenceModel |
||
153 | */ |
||
154 | public function getPreferenceModel($userId) |
||
162 | |||
163 | /** |
||
164 | * @return WebhookModel |
||
165 | */ |
||
166 | public function getWebhookModel() |
||
170 | |||
171 | /** |
||
172 | * @return SystemModel |
||
173 | */ |
||
174 | public function getSystemModel() |
||
178 | |||
179 | /** |
||
180 | * @return ComplianceModel |
||
181 | */ |
||
182 | public function getComplianceModel() |
||
186 | |||
187 | /** |
||
188 | * @return CommandModel |
||
189 | */ |
||
190 | public function getCommandModel() |
||
194 | |||
195 | /** |
||
196 | * @return ClusterModel |
||
197 | */ |
||
198 | public function getClusterModel() |
||
202 | |||
203 | /** |
||
204 | * @return BrandModel |
||
205 | */ |
||
206 | public function getBrandModel() |
||
210 | |||
211 | /** |
||
212 | * @return LDAPModel |
||
213 | */ |
||
214 | public function getLDAPModel() |
||
218 | |||
219 | /** |
||
220 | * @return OAuthModel |
||
221 | */ |
||
222 | public function getOAuthModel() |
||
226 | |||
227 | /** |
||
228 | * @return SAMLModel |
||
229 | */ |
||
230 | public function getSAMLModel() |
||
234 | |||
235 | /** |
||
236 | * @return ElasticsearchModel |
||
237 | */ |
||
238 | public function getElasticsearchModel() |
||
242 | |||
243 | /** |
||
244 | * @return EmojiModel |
||
245 | */ |
||
246 | public function getEmojiModelModel() |
||
250 | } |