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 | /** |
||
102 | * @param $className |
||
103 | * @return mixed |
||
104 | */ |
||
105 | private function getModel($className) |
||
113 | |||
114 | /** |
||
115 | * @return UserModel |
||
116 | */ |
||
117 | public function getUserModel() |
||
121 | |||
122 | /** |
||
123 | * @return TeamModel |
||
124 | */ |
||
125 | public function getTeamModel() |
||
129 | |||
130 | /** |
||
131 | * @return ChannelModel |
||
132 | */ |
||
133 | public function getChannelModel() |
||
137 | |||
138 | /** |
||
139 | * @return PostModel |
||
140 | */ |
||
141 | public function getPostModel() |
||
145 | |||
146 | /** |
||
147 | * @return FileModel |
||
148 | */ |
||
149 | public function getFileModel() |
||
153 | |||
154 | /** |
||
155 | * @param $userId |
||
156 | * @return PreferenceModel |
||
157 | */ |
||
158 | public function getPreferenceModel($userId) |
||
166 | |||
167 | /** |
||
168 | * @return WebhookModel |
||
169 | */ |
||
170 | public function getWebhookModel() |
||
174 | |||
175 | /** |
||
176 | * @return SystemModel |
||
177 | */ |
||
178 | public function getSystemModel() |
||
182 | |||
183 | /** |
||
184 | * @return ComplianceModel |
||
185 | */ |
||
186 | public function getComplianceModel() |
||
190 | |||
191 | /** |
||
192 | * @return CommandModel |
||
193 | */ |
||
194 | public function getCommandModel() |
||
198 | |||
199 | /** |
||
200 | * @return ClusterModel |
||
201 | */ |
||
202 | public function getClusterModel() |
||
206 | |||
207 | /** |
||
208 | * @return BrandModel |
||
209 | */ |
||
210 | public function getBrandModel() |
||
214 | |||
215 | /** |
||
216 | * @return LDAPModel |
||
217 | */ |
||
218 | public function getLDAPModel() |
||
222 | |||
223 | /** |
||
224 | * @return OAuthModel |
||
225 | */ |
||
226 | public function getOAuthModel() |
||
230 | |||
231 | /** |
||
232 | * @return SAMLModel |
||
233 | */ |
||
234 | public function getSAMLModel() |
||
238 | |||
239 | /** |
||
240 | * @return ElasticsearchModel |
||
241 | */ |
||
242 | public function getElasticsearchModel() |
||
246 | |||
247 | /** |
||
248 | * @return EmojiModel |
||
249 | */ |
||
250 | public function getEmojiModel() |
||
254 | |||
255 | /** |
||
256 | * @return ReactionModel |
||
257 | */ |
||
258 | public function getReactionModel() |
||
262 | } |
||
263 |