1 | <?php |
||
40 | class OcmMiddleware { |
||
41 | /** |
||
42 | * @var FederatedShareProvider |
||
43 | */ |
||
44 | protected $federatedShareProvider; |
||
45 | |||
46 | /** |
||
47 | * @var IAppManager |
||
48 | */ |
||
49 | protected $appManager; |
||
50 | |||
51 | /** |
||
52 | * @var IUserManager |
||
53 | */ |
||
54 | protected $userManager; |
||
55 | |||
56 | /** |
||
57 | * @var AddressHandler |
||
58 | */ |
||
59 | protected $addressHandler; |
||
60 | |||
61 | /** |
||
62 | * @var ILogger |
||
63 | */ |
||
64 | protected $logger; |
||
65 | |||
66 | /** |
||
67 | * constructor. |
||
68 | * |
||
69 | * @param FederatedShareProvider $federatedShareProvider |
||
70 | * @param IAppManager $appManager |
||
71 | * @param IUserManager $userManager |
||
72 | * @param AddressHandler $addressHandler |
||
73 | * @param ILogger $logger |
||
74 | */ |
||
75 | public function __construct( |
||
88 | |||
89 | /** |
||
90 | * Check if value an array has any null item |
||
91 | * |
||
92 | * @param string[] $params |
||
93 | * |
||
94 | * @return bool |
||
95 | * |
||
96 | * @throws BadRequestException |
||
97 | */ |
||
98 | public function assertNotNull($params) { |
||
116 | |||
117 | /** |
||
118 | * Get share by id, validate its type and token |
||
119 | * |
||
120 | * @param int $id |
||
121 | * @param string $sharedSecret |
||
122 | * |
||
123 | * @return IShare |
||
124 | * |
||
125 | * @throws BadRequestException |
||
126 | * @throws ForbiddenException |
||
127 | */ |
||
128 | public function getValidShare($id, $sharedSecret) { |
||
143 | |||
144 | /** |
||
145 | * Make sure that incoming shares are enabled |
||
146 | * |
||
147 | * @return void |
||
148 | * |
||
149 | * @throws NotImplementedException |
||
150 | */ |
||
151 | public function assertIncomingSharingEnabled() { |
||
158 | |||
159 | /** |
||
160 | * Make sure that outgoing shares are enabled |
||
161 | * |
||
162 | * @return void |
||
163 | * |
||
164 | * @throws NotImplementedException |
||
165 | */ |
||
166 | public function assertOutgoingSharingEnabled() { |
||
173 | } |
||
174 |