44 *
55 * @author Bjoern Schiessle <bjoern@schiessle.org>
66 * @author Christoph Wurst <christoph@winzerhof-wurst.at>
7+ * @author Maxence Lange <maxence@artificial-owl.com>
78 * @author Roeland Jago Douma <roeland@famdouma.nl>
89 *
910 * @license GNU AGPL version 3 or any later version
5152 * @package OCA\CloudFederationAPI\Controller
5253 */
5354class RequestHandlerController extends Controller {
54-
55- /** @var LoggerInterface */
56- private $ logger ;
57-
58- /** @var IUserManager */
59- private $ userManager ;
60-
61- /** @var IGroupManager */
62- private $ groupManager ;
63-
64- /** @var IURLGenerator */
65- private $ urlGenerator ;
66-
67- /** @var ICloudFederationProviderManager */
68- private $ cloudFederationProviderManager ;
69-
70- /** @var Config */
71- private $ config ;
72-
73- /** @var ICloudFederationFactory */
74- private $ factory ;
75-
76- /** @var ICloudIdManager */
77- private $ cloudIdManager ;
78-
79- public function __construct ($ appName ,
80- IRequest $ request ,
81- LoggerInterface $ logger ,
82- IUserManager $ userManager ,
83- IGroupManager $ groupManager ,
84- IURLGenerator $ urlGenerator ,
85- ICloudFederationProviderManager $ cloudFederationProviderManager ,
86- Config $ config ,
87- ICloudFederationFactory $ factory ,
88- ICloudIdManager $ cloudIdManager
55+ public function __construct (
56+ string $ appName ,
57+ IRequest $ request ,
58+ private LoggerInterface $ logger ,
59+ private IUserManager $ userManager ,
60+ private IGroupManager $ groupManager ,
61+ private IURLGenerator $ urlGenerator ,
62+ private ICloudFederationProviderManager $ cloudFederationProviderManager ,
63+ private Config $ config ,
64+ private ICloudFederationFactory $ factory ,
65+ private ICloudIdManager $ cloudIdManager
8966 ) {
9067 parent ::__construct ($ appName , $ request );
91-
92- $ this ->logger = $ logger ;
93- $ this ->userManager = $ userManager ;
94- $ this ->groupManager = $ groupManager ;
95- $ this ->urlGenerator = $ urlGenerator ;
96- $ this ->cloudFederationProviderManager = $ cloudFederationProviderManager ;
97- $ this ->config = $ config ;
98- $ this ->factory = $ factory ;
99- $ this ->cloudIdManager = $ cloudIdManager ;
10068 }
10169
10270 /**
@@ -122,7 +90,6 @@ public function __construct($appName,
12290 * Example: curl -H "Content-Type: application/json" -X POST -d '{"shareWith":"admin1@serve1","name":"welcome server2.txt","description":"desc","providerId":"2","owner":"admin2@http://localhost/server2","ownerDisplayName":"admin2 display","shareType":"user","resourceType":"file","protocol":{"name":"webdav","options":{"sharedSecret":"secret","permissions":"webdav-property"}}}' http://localhost/server/index.php/ocm/shares
12391 */
12492 public function addShare ($ shareWith , $ name , $ description , $ providerId , $ owner , $ ownerDisplayName , $ sharedBy , $ sharedByDisplayName , $ protocol , $ shareType , $ resourceType ) {
125-
12693 // check if all required parameters are set
12794 if ($ shareWith === null ||
12895 $ name === null ||
@@ -281,7 +248,7 @@ public function receiveNotification($notificationType, $resourceType, $providerI
281248 );
282249 }
283250
284- return new JSONResponse ($ result ,Http::STATUS_CREATED );
251+ return new JSONResponse ($ result , Http::STATUS_CREATED );
285252 }
286253
287254 /**
0 commit comments