Completed
Pull Request — master (#8783)
by Morris
50:28 queued 28:11
created
lib/public/Util.php 2 patches
Indentation   +524 added lines, -524 removed lines patch added patch discarded remove patch
@@ -57,530 +57,530 @@
 block discarded – undo
57 57
  * @since 4.0.0
58 58
  */
59 59
 class Util {
60
-	// consts for Logging
61
-	const DEBUG=0;
62
-	const INFO=1;
63
-	const WARN=2;
64
-	const ERROR=3;
65
-	const FATAL=4;
66
-
67
-	/** \OCP\Share\IManager */
68
-	private static $shareManager;
69
-
70
-	/**
71
-	 * get the current installed version of ownCloud
72
-	 * @return array
73
-	 * @since 4.0.0
74
-	 */
75
-	public static function getVersion() {
76
-		return \OC_Util::getVersion();
77
-	}
60
+    // consts for Logging
61
+    const DEBUG=0;
62
+    const INFO=1;
63
+    const WARN=2;
64
+    const ERROR=3;
65
+    const FATAL=4;
66
+
67
+    /** \OCP\Share\IManager */
68
+    private static $shareManager;
69
+
70
+    /**
71
+     * get the current installed version of ownCloud
72
+     * @return array
73
+     * @since 4.0.0
74
+     */
75
+    public static function getVersion() {
76
+        return \OC_Util::getVersion();
77
+    }
78 78
 	
79
-	/**
80
-	 * Set current update channel
81
-	 * @param string $channel
82
-	 * @since 8.1.0
83
-	 */
84
-	public static function setChannel($channel) {
85
-		\OC::$server->getConfig()->setSystemValue('updater.release.channel', $channel);
86
-	}
79
+    /**
80
+     * Set current update channel
81
+     * @param string $channel
82
+     * @since 8.1.0
83
+     */
84
+    public static function setChannel($channel) {
85
+        \OC::$server->getConfig()->setSystemValue('updater.release.channel', $channel);
86
+    }
87 87
 	
88
-	/**
89
-	 * Get current update channel
90
-	 * @return string
91
-	 * @since 8.1.0
92
-	 */
93
-	public static function getChannel() {
94
-		return \OC_Util::getChannel();
95
-	}
96
-
97
-	/**
98
-	 * write a message in the log
99
-	 * @param string $app
100
-	 * @param string $message
101
-	 * @param int $level
102
-	 * @since 4.0.0
103
-	 * @deprecated 13.0.0 use log of \OCP\ILogger
104
-	 */
105
-	public static function writeLog( $app, $message, $level ) {
106
-		$context = ['app' => $app];
107
-		\OC::$server->getLogger()->log($level, $message, $context);
108
-	}
109
-
110
-	/**
111
-	 * write exception into the log
112
-	 * @param string $app app name
113
-	 * @param \Exception $ex exception to log
114
-	 * @param int $level log level, defaults to \OCP\Util::FATAL
115
-	 * @since ....0.0 - parameter $level was added in 7.0.0
116
-	 * @deprecated 8.2.0 use logException of \OCP\ILogger
117
-	 */
118
-	public static function logException( $app, \Exception $ex, $level = \OCP\Util::FATAL ) {
119
-		\OC::$server->getLogger()->logException($ex, ['app' => $app]);
120
-	}
121
-
122
-	/**
123
-	 * check if sharing is disabled for the current user
124
-	 *
125
-	 * @return boolean
126
-	 * @since 7.0.0
127
-	 * @deprecated 9.1.0 Use \OC::$server->getShareManager()->sharingDisabledForUser
128
-	 */
129
-	public static function isSharingDisabledForUser() {
130
-		if (self::$shareManager === null) {
131
-			self::$shareManager = \OC::$server->getShareManager();
132
-		}
133
-
134
-		$user = \OC::$server->getUserSession()->getUser();
135
-		if ($user !== null) {
136
-			$user = $user->getUID();
137
-		}
138
-
139
-		return self::$shareManager->sharingDisabledForUser($user);
140
-	}
141
-
142
-	/**
143
-	 * get l10n object
144
-	 * @param string $application
145
-	 * @param string|null $language
146
-	 * @return \OCP\IL10N
147
-	 * @since 6.0.0 - parameter $language was added in 8.0.0
148
-	 */
149
-	public static function getL10N($application, $language = null) {
150
-		return \OC::$server->getL10N($application, $language);
151
-	}
152
-
153
-	/**
154
-	 * add a css file
155
-	 * @param string $application
156
-	 * @param string $file
157
-	 * @since 4.0.0
158
-	 */
159
-	public static function addStyle( $application, $file = null ) {
160
-		\OC_Util::addStyle( $application, $file );
161
-	}
162
-
163
-	/**
164
-	 * add a javascript file
165
-	 * @param string $application
166
-	 * @param string $file
167
-	 * @since 4.0.0
168
-	 */
169
-	public static function addScript( $application, $file = null ) {
170
-		\OC_Util::addScript( $application, $file );
171
-	}
172
-
173
-	/**
174
-	 * Add a translation JS file
175
-	 * @param string $application application id
176
-	 * @param string $languageCode language code, defaults to the current locale
177
-	 * @since 8.0.0
178
-	 */
179
-	public static function addTranslations($application, $languageCode = null) {
180
-		\OC_Util::addTranslations($application, $languageCode);
181
-	}
182
-
183
-	/**
184
-	 * Add a custom element to the header
185
-	 * If $text is null then the element will be written as empty element.
186
-	 * So use "" to get a closing tag.
187
-	 * @param string $tag tag name of the element
188
-	 * @param array $attributes array of attributes for the element
189
-	 * @param string $text the text content for the element
190
-	 * @since 4.0.0
191
-	 */
192
-	public static function addHeader($tag, $attributes, $text=null) {
193
-		\OC_Util::addHeader($tag, $attributes, $text);
194
-	}
195
-
196
-	/**
197
-	 * Creates an absolute url to the given app and file.
198
-	 * @param string $app app
199
-	 * @param string $file file
200
-	 * @param array $args array with param=>value, will be appended to the returned url
201
-	 * 	The value of $args will be urlencoded
202
-	 * @return string the url
203
-	 * @since 4.0.0 - parameter $args was added in 4.5.0
204
-	 */
205
-	public static function linkToAbsolute( $app, $file, $args = array() ) {
206
-		$urlGenerator = \OC::$server->getURLGenerator();
207
-		return $urlGenerator->getAbsoluteURL(
208
-			$urlGenerator->linkTo($app, $file, $args)
209
-		);
210
-	}
211
-
212
-	/**
213
-	 * Creates an absolute url for remote use.
214
-	 * @param string $service id
215
-	 * @return string the url
216
-	 * @since 4.0.0
217
-	 */
218
-	public static function linkToRemote( $service ) {
219
-		$urlGenerator = \OC::$server->getURLGenerator();
220
-		$remoteBase = $urlGenerator->linkTo('', 'remote.php') . '/' . $service;
221
-		return $urlGenerator->getAbsoluteURL(
222
-			$remoteBase . (($service[strlen($service) - 1] != '/') ? '/' : '')
223
-		);
224
-	}
225
-
226
-	/**
227
-	 * Creates an absolute url for public use
228
-	 * @param string $service id
229
-	 * @return string the url
230
-	 * @since 4.5.0
231
-	 */
232
-	public static function linkToPublic($service) {
233
-		return \OC_Helper::linkToPublic($service);
234
-	}
235
-
236
-	/**
237
-	 * Creates an url using a defined route
238
-	 * @param string $route
239
-	 * @param array $parameters
240
-	 * @internal param array $args with param=>value, will be appended to the returned url
241
-	 * @return string the url
242
-	 * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->linkToRoute($route, $parameters)
243
-	 * @since 5.0.0
244
-	 */
245
-	public static function linkToRoute( $route, $parameters = array() ) {
246
-		return \OC::$server->getURLGenerator()->linkToRoute($route, $parameters);
247
-	}
248
-
249
-	/**
250
-	 * Creates an url to the given app and file
251
-	 * @param string $app app
252
-	 * @param string $file file
253
-	 * @param array $args array with param=>value, will be appended to the returned url
254
-	 * 	The value of $args will be urlencoded
255
-	 * @return string the url
256
-	 * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->linkTo($app, $file, $args)
257
-	 * @since 4.0.0 - parameter $args was added in 4.5.0
258
-	 */
259
-	public static function linkTo( $app, $file, $args = array() ) {
260
-		return \OC::$server->getURLGenerator()->linkTo($app, $file, $args);
261
-	}
262
-
263
-	/**
264
-	 * Returns the server host name without an eventual port number
265
-	 * @return string the server hostname
266
-	 * @since 5.0.0
267
-	 */
268
-	public static function getServerHostName() {
269
-		$host_name = \OC::$server->getRequest()->getServerHost();
270
-		// strip away port number (if existing)
271
-		$colon_pos = strpos($host_name, ':');
272
-		if ($colon_pos != FALSE) {
273
-			$host_name = substr($host_name, 0, $colon_pos);
274
-		}
275
-		return $host_name;
276
-	}
277
-
278
-	/**
279
-	 * Returns the default email address
280
-	 * @param string $user_part the user part of the address
281
-	 * @return string the default email address
282
-	 *
283
-	 * Assembles a default email address (using the server hostname
284
-	 * and the given user part, and returns it
285
-	 * Example: when given lostpassword-noreply as $user_part param,
286
-	 *     and is currently accessed via http(s)://example.com/,
287
-	 *     it would return '[email protected]'
288
-	 *
289
-	 * If the configuration value 'mail_from_address' is set in
290
-	 * config.php, this value will override the $user_part that
291
-	 * is passed to this function
292
-	 * @since 5.0.0
293
-	 */
294
-	public static function getDefaultEmailAddress($user_part) {
295
-		$config = \OC::$server->getConfig();
296
-		$user_part = $config->getSystemValue('mail_from_address', $user_part);
297
-		$host_name = self::getServerHostName();
298
-		$host_name = $config->getSystemValue('mail_domain', $host_name);
299
-		$defaultEmailAddress = $user_part.'@'.$host_name;
300
-
301
-		$mailer = \OC::$server->getMailer();
302
-		if ($mailer->validateMailAddress($defaultEmailAddress)) {
303
-			return $defaultEmailAddress;
304
-		}
305
-
306
-		// in case we cannot build a valid email address from the hostname let's fallback to 'localhost.localdomain'
307
-		return $user_part.'@localhost.localdomain';
308
-	}
309
-
310
-	/**
311
-	 * Creates path to an image
312
-	 * @param string $app app
313
-	 * @param string $image image name
314
-	 * @return string the url
315
-	 * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->imagePath($app, $image)
316
-	 * @since 4.0.0
317
-	 */
318
-	public static function imagePath( $app, $image ) {
319
-		return \OC::$server->getURLGenerator()->imagePath($app, $image);
320
-	}
321
-
322
-	/**
323
-	 * Make a human file size (2048 to 2 kB)
324
-	 * @param int $bytes file size in bytes
325
-	 * @return string a human readable file size
326
-	 * @since 4.0.0
327
-	 */
328
-	public static function humanFileSize($bytes) {
329
-		return \OC_Helper::humanFileSize($bytes);
330
-	}
331
-
332
-	/**
333
-	 * Make a computer file size (2 kB to 2048)
334
-	 * @param string $str file size in a fancy format
335
-	 * @return float a file size in bytes
336
-	 *
337
-	 * Inspired by: http://www.php.net/manual/en/function.filesize.php#92418
338
-	 * @since 4.0.0
339
-	 */
340
-	public static function computerFileSize($str) {
341
-		return \OC_Helper::computerFileSize($str);
342
-	}
343
-
344
-	/**
345
-	 * connects a function to a hook
346
-	 *
347
-	 * @param string $signalClass class name of emitter
348
-	 * @param string $signalName name of signal
349
-	 * @param string|object $slotClass class name of slot
350
-	 * @param string $slotName name of slot
351
-	 * @return bool
352
-	 *
353
-	 * This function makes it very easy to connect to use hooks.
354
-	 *
355
-	 * TODO: write example
356
-	 * @since 4.0.0
357
-	 */
358
-	static public function connectHook($signalClass, $signalName, $slotClass, $slotName) {
359
-		return \OC_Hook::connect($signalClass, $signalName, $slotClass, $slotName);
360
-	}
361
-
362
-	/**
363
-	 * Emits a signal. To get data from the slot use references!
364
-	 * @param string $signalclass class name of emitter
365
-	 * @param string $signalname name of signal
366
-	 * @param array $params default: array() array with additional data
367
-	 * @return bool true if slots exists or false if not
368
-	 *
369
-	 * TODO: write example
370
-	 * @since 4.0.0
371
-	 */
372
-	static public function emitHook($signalclass, $signalname, $params = array()) {
373
-		return \OC_Hook::emit($signalclass, $signalname, $params);
374
-	}
375
-
376
-	/**
377
-	 * Cached encrypted CSRF token. Some static unit-tests of ownCloud compare
378
-	 * multiple OC_Template elements which invoke `callRegister`. If the value
379
-	 * would not be cached these unit-tests would fail.
380
-	 * @var string
381
-	 */
382
-	private static $token = '';
383
-
384
-	/**
385
-	 * Register an get/post call. This is important to prevent CSRF attacks
386
-	 * @since 4.5.0
387
-	 */
388
-	public static function callRegister() {
389
-		if(self::$token === '') {
390
-			self::$token = \OC::$server->getCsrfTokenManager()->getToken()->getEncryptedValue();
391
-		}
392
-		return self::$token;
393
-	}
394
-
395
-	/**
396
-	 * Check an ajax get/post call if the request token is valid. exit if not.
397
-	 * @since 4.5.0
398
-	 * @deprecated 9.0.0 Use annotations based on the app framework.
399
-	 */
400
-	public static function callCheck() {
401
-		if(!\OC::$server->getRequest()->passesStrictCookieCheck()) {
402
-			header('Location: '.\OC::$WEBROOT);
403
-			exit();
404
-		}
405
-
406
-		if (!\OC::$server->getRequest()->passesCSRFCheck()) {
407
-			exit();
408
-		}
409
-	}
410
-
411
-	/**
412
-	 * Used to sanitize HTML
413
-	 *
414
-	 * This function is used to sanitize HTML and should be applied on any
415
-	 * string or array of strings before displaying it on a web page.
416
-	 *
417
-	 * @param string|array $value
418
-	 * @return string|array an array of sanitized strings or a single sanitized string, depends on the input parameter.
419
-	 * @since 4.5.0
420
-	 */
421
-	public static function sanitizeHTML($value) {
422
-		return \OC_Util::sanitizeHTML($value);
423
-	}
424
-
425
-	/**
426
-	 * Public function to encode url parameters
427
-	 *
428
-	 * This function is used to encode path to file before output.
429
-	 * Encoding is done according to RFC 3986 with one exception:
430
-	 * Character '/' is preserved as is.
431
-	 *
432
-	 * @param string $component part of URI to encode
433
-	 * @return string
434
-	 * @since 6.0.0
435
-	 */
436
-	public static function encodePath($component) {
437
-		return \OC_Util::encodePath($component);
438
-	}
439
-
440
-	/**
441
-	 * Returns an array with all keys from input lowercased or uppercased. Numbered indices are left as is.
442
-	 *
443
-	 * @param array $input The array to work on
444
-	 * @param int $case Either MB_CASE_UPPER or MB_CASE_LOWER (default)
445
-	 * @param string $encoding The encoding parameter is the character encoding. Defaults to UTF-8
446
-	 * @return array
447
-	 * @since 4.5.0
448
-	 */
449
-	public static function mb_array_change_key_case($input, $case = MB_CASE_LOWER, $encoding = 'UTF-8') {
450
-		return \OC_Helper::mb_array_change_key_case($input, $case, $encoding);
451
-	}
452
-
453
-	/**
454
-	 * replaces a copy of string delimited by the start and (optionally) length parameters with the string given in replacement.
455
-	 *
456
-	 * @param string $string The input string. Opposite to the PHP build-in function does not accept an array.
457
-	 * @param string $replacement The replacement string.
458
-	 * @param int $start If start is positive, the replacing will begin at the start'th offset into string. If start is negative, the replacing will begin at the start'th character from the end of string.
459
-	 * @param int $length Length of the part to be replaced
460
-	 * @param string $encoding The encoding parameter is the character encoding. Defaults to UTF-8
461
-	 * @return string
462
-	 * @since 4.5.0
463
-	 * @deprecated 8.2.0 Use substr_replace() instead.
464
-	 */
465
-	public static function mb_substr_replace($string, $replacement, $start, $length = null, $encoding = 'UTF-8') {
466
-		return substr_replace($string, $replacement, $start, $length);
467
-	}
468
-
469
-	/**
470
-	 * Replace all occurrences of the search string with the replacement string
471
-	 *
472
-	 * @param string $search The value being searched for, otherwise known as the needle. String.
473
-	 * @param string $replace The replacement string.
474
-	 * @param string $subject The string or array being searched and replaced on, otherwise known as the haystack.
475
-	 * @param string $encoding The encoding parameter is the character encoding. Defaults to UTF-8
476
-	 * @param int $count If passed, this will be set to the number of replacements performed.
477
-	 * @return string
478
-	 * @since 4.5.0
479
-	 * @deprecated 8.2.0 Use str_replace() instead.
480
-	 */
481
-	public static function mb_str_replace($search, $replace, $subject, $encoding = 'UTF-8', &$count = null) {
482
-		return str_replace($search, $replace, $subject, $count);
483
-	}
484
-
485
-	/**
486
-	 * performs a search in a nested array
487
-	 *
488
-	 * @param array $haystack the array to be searched
489
-	 * @param string $needle the search string
490
-	 * @param mixed $index optional, only search this key name
491
-	 * @return mixed the key of the matching field, otherwise false
492
-	 * @since 4.5.0
493
-	 */
494
-	public static function recursiveArraySearch($haystack, $needle, $index = null) {
495
-		return \OC_Helper::recursiveArraySearch($haystack, $needle, $index);
496
-	}
497
-
498
-	/**
499
-	 * calculates the maximum upload size respecting system settings, free space and user quota
500
-	 *
501
-	 * @param string $dir the current folder where the user currently operates
502
-	 * @param int $free the number of bytes free on the storage holding $dir, if not set this will be received from the storage directly
503
-	 * @return int number of bytes representing
504
-	 * @since 5.0.0
505
-	 */
506
-	public static function maxUploadFilesize($dir, $free = null) {
507
-		return \OC_Helper::maxUploadFilesize($dir, $free);
508
-	}
509
-
510
-	/**
511
-	 * Calculate free space left within user quota
512
-	 * @param string $dir the current folder where the user currently operates
513
-	 * @return int number of bytes representing
514
-	 * @since 7.0.0
515
-	 */
516
-	public static function freeSpace($dir) {
517
-		return \OC_Helper::freeSpace($dir);
518
-	}
519
-
520
-	/**
521
-	 * Calculate PHP upload limit
522
-	 *
523
-	 * @return int number of bytes representing
524
-	 * @since 7.0.0
525
-	 */
526
-	public static function uploadLimit() {
527
-		return \OC_Helper::uploadLimit();
528
-	}
529
-
530
-	/**
531
-	 * Returns whether the given file name is valid
532
-	 * @param string $file file name to check
533
-	 * @return bool true if the file name is valid, false otherwise
534
-	 * @deprecated 8.1.0 use \OC\Files\View::verifyPath()
535
-	 * @since 7.0.0
536
-	 * @suppress PhanDeprecatedFunction
537
-	 */
538
-	public static function isValidFileName($file) {
539
-		return \OC_Util::isValidFileName($file);
540
-	}
541
-
542
-	/**
543
-	 * Compare two strings to provide a natural sort
544
-	 * @param string $a first string to compare
545
-	 * @param string $b second string to compare
546
-	 * @return int -1 if $b comes before $a, 1 if $a comes before $b
547
-	 * or 0 if the strings are identical
548
-	 * @since 7.0.0
549
-	 */
550
-	public static function naturalSortCompare($a, $b) {
551
-		return \OC\NaturalSort::getInstance()->compare($a, $b);
552
-	}
553
-
554
-	/**
555
-	 * check if a password is required for each public link
556
-	 * @return boolean
557
-	 * @since 7.0.0
558
-	 */
559
-	public static function isPublicLinkPasswordRequired() {
560
-		return \OC_Util::isPublicLinkPasswordRequired();
561
-	}
562
-
563
-	/**
564
-	 * check if share API enforces a default expire date
565
-	 * @return boolean
566
-	 * @since 8.0.0
567
-	 */
568
-	public static function isDefaultExpireDateEnforced() {
569
-		return \OC_Util::isDefaultExpireDateEnforced();
570
-	}
571
-
572
-	protected static $needUpgradeCache = null;
573
-
574
-	/**
575
-	 * Checks whether the current version needs upgrade.
576
-	 *
577
-	 * @return bool true if upgrade is needed, false otherwise
578
-	 * @since 7.0.0
579
-	 */
580
-	public static function needUpgrade() {
581
-		if (!isset(self::$needUpgradeCache)) {
582
-			self::$needUpgradeCache=\OC_Util::needUpgrade(\OC::$server->getSystemConfig());
583
-		}		
584
-		return self::$needUpgradeCache;
585
-	}
88
+    /**
89
+     * Get current update channel
90
+     * @return string
91
+     * @since 8.1.0
92
+     */
93
+    public static function getChannel() {
94
+        return \OC_Util::getChannel();
95
+    }
96
+
97
+    /**
98
+     * write a message in the log
99
+     * @param string $app
100
+     * @param string $message
101
+     * @param int $level
102
+     * @since 4.0.0
103
+     * @deprecated 13.0.0 use log of \OCP\ILogger
104
+     */
105
+    public static function writeLog( $app, $message, $level ) {
106
+        $context = ['app' => $app];
107
+        \OC::$server->getLogger()->log($level, $message, $context);
108
+    }
109
+
110
+    /**
111
+     * write exception into the log
112
+     * @param string $app app name
113
+     * @param \Exception $ex exception to log
114
+     * @param int $level log level, defaults to \OCP\Util::FATAL
115
+     * @since ....0.0 - parameter $level was added in 7.0.0
116
+     * @deprecated 8.2.0 use logException of \OCP\ILogger
117
+     */
118
+    public static function logException( $app, \Exception $ex, $level = \OCP\Util::FATAL ) {
119
+        \OC::$server->getLogger()->logException($ex, ['app' => $app]);
120
+    }
121
+
122
+    /**
123
+     * check if sharing is disabled for the current user
124
+     *
125
+     * @return boolean
126
+     * @since 7.0.0
127
+     * @deprecated 9.1.0 Use \OC::$server->getShareManager()->sharingDisabledForUser
128
+     */
129
+    public static function isSharingDisabledForUser() {
130
+        if (self::$shareManager === null) {
131
+            self::$shareManager = \OC::$server->getShareManager();
132
+        }
133
+
134
+        $user = \OC::$server->getUserSession()->getUser();
135
+        if ($user !== null) {
136
+            $user = $user->getUID();
137
+        }
138
+
139
+        return self::$shareManager->sharingDisabledForUser($user);
140
+    }
141
+
142
+    /**
143
+     * get l10n object
144
+     * @param string $application
145
+     * @param string|null $language
146
+     * @return \OCP\IL10N
147
+     * @since 6.0.0 - parameter $language was added in 8.0.0
148
+     */
149
+    public static function getL10N($application, $language = null) {
150
+        return \OC::$server->getL10N($application, $language);
151
+    }
152
+
153
+    /**
154
+     * add a css file
155
+     * @param string $application
156
+     * @param string $file
157
+     * @since 4.0.0
158
+     */
159
+    public static function addStyle( $application, $file = null ) {
160
+        \OC_Util::addStyle( $application, $file );
161
+    }
162
+
163
+    /**
164
+     * add a javascript file
165
+     * @param string $application
166
+     * @param string $file
167
+     * @since 4.0.0
168
+     */
169
+    public static function addScript( $application, $file = null ) {
170
+        \OC_Util::addScript( $application, $file );
171
+    }
172
+
173
+    /**
174
+     * Add a translation JS file
175
+     * @param string $application application id
176
+     * @param string $languageCode language code, defaults to the current locale
177
+     * @since 8.0.0
178
+     */
179
+    public static function addTranslations($application, $languageCode = null) {
180
+        \OC_Util::addTranslations($application, $languageCode);
181
+    }
182
+
183
+    /**
184
+     * Add a custom element to the header
185
+     * If $text is null then the element will be written as empty element.
186
+     * So use "" to get a closing tag.
187
+     * @param string $tag tag name of the element
188
+     * @param array $attributes array of attributes for the element
189
+     * @param string $text the text content for the element
190
+     * @since 4.0.0
191
+     */
192
+    public static function addHeader($tag, $attributes, $text=null) {
193
+        \OC_Util::addHeader($tag, $attributes, $text);
194
+    }
195
+
196
+    /**
197
+     * Creates an absolute url to the given app and file.
198
+     * @param string $app app
199
+     * @param string $file file
200
+     * @param array $args array with param=>value, will be appended to the returned url
201
+     * 	The value of $args will be urlencoded
202
+     * @return string the url
203
+     * @since 4.0.0 - parameter $args was added in 4.5.0
204
+     */
205
+    public static function linkToAbsolute( $app, $file, $args = array() ) {
206
+        $urlGenerator = \OC::$server->getURLGenerator();
207
+        return $urlGenerator->getAbsoluteURL(
208
+            $urlGenerator->linkTo($app, $file, $args)
209
+        );
210
+    }
211
+
212
+    /**
213
+     * Creates an absolute url for remote use.
214
+     * @param string $service id
215
+     * @return string the url
216
+     * @since 4.0.0
217
+     */
218
+    public static function linkToRemote( $service ) {
219
+        $urlGenerator = \OC::$server->getURLGenerator();
220
+        $remoteBase = $urlGenerator->linkTo('', 'remote.php') . '/' . $service;
221
+        return $urlGenerator->getAbsoluteURL(
222
+            $remoteBase . (($service[strlen($service) - 1] != '/') ? '/' : '')
223
+        );
224
+    }
225
+
226
+    /**
227
+     * Creates an absolute url for public use
228
+     * @param string $service id
229
+     * @return string the url
230
+     * @since 4.5.0
231
+     */
232
+    public static function linkToPublic($service) {
233
+        return \OC_Helper::linkToPublic($service);
234
+    }
235
+
236
+    /**
237
+     * Creates an url using a defined route
238
+     * @param string $route
239
+     * @param array $parameters
240
+     * @internal param array $args with param=>value, will be appended to the returned url
241
+     * @return string the url
242
+     * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->linkToRoute($route, $parameters)
243
+     * @since 5.0.0
244
+     */
245
+    public static function linkToRoute( $route, $parameters = array() ) {
246
+        return \OC::$server->getURLGenerator()->linkToRoute($route, $parameters);
247
+    }
248
+
249
+    /**
250
+     * Creates an url to the given app and file
251
+     * @param string $app app
252
+     * @param string $file file
253
+     * @param array $args array with param=>value, will be appended to the returned url
254
+     * 	The value of $args will be urlencoded
255
+     * @return string the url
256
+     * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->linkTo($app, $file, $args)
257
+     * @since 4.0.0 - parameter $args was added in 4.5.0
258
+     */
259
+    public static function linkTo( $app, $file, $args = array() ) {
260
+        return \OC::$server->getURLGenerator()->linkTo($app, $file, $args);
261
+    }
262
+
263
+    /**
264
+     * Returns the server host name without an eventual port number
265
+     * @return string the server hostname
266
+     * @since 5.0.0
267
+     */
268
+    public static function getServerHostName() {
269
+        $host_name = \OC::$server->getRequest()->getServerHost();
270
+        // strip away port number (if existing)
271
+        $colon_pos = strpos($host_name, ':');
272
+        if ($colon_pos != FALSE) {
273
+            $host_name = substr($host_name, 0, $colon_pos);
274
+        }
275
+        return $host_name;
276
+    }
277
+
278
+    /**
279
+     * Returns the default email address
280
+     * @param string $user_part the user part of the address
281
+     * @return string the default email address
282
+     *
283
+     * Assembles a default email address (using the server hostname
284
+     * and the given user part, and returns it
285
+     * Example: when given lostpassword-noreply as $user_part param,
286
+     *     and is currently accessed via http(s)://example.com/,
287
+     *     it would return '[email protected]'
288
+     *
289
+     * If the configuration value 'mail_from_address' is set in
290
+     * config.php, this value will override the $user_part that
291
+     * is passed to this function
292
+     * @since 5.0.0
293
+     */
294
+    public static function getDefaultEmailAddress($user_part) {
295
+        $config = \OC::$server->getConfig();
296
+        $user_part = $config->getSystemValue('mail_from_address', $user_part);
297
+        $host_name = self::getServerHostName();
298
+        $host_name = $config->getSystemValue('mail_domain', $host_name);
299
+        $defaultEmailAddress = $user_part.'@'.$host_name;
300
+
301
+        $mailer = \OC::$server->getMailer();
302
+        if ($mailer->validateMailAddress($defaultEmailAddress)) {
303
+            return $defaultEmailAddress;
304
+        }
305
+
306
+        // in case we cannot build a valid email address from the hostname let's fallback to 'localhost.localdomain'
307
+        return $user_part.'@localhost.localdomain';
308
+    }
309
+
310
+    /**
311
+     * Creates path to an image
312
+     * @param string $app app
313
+     * @param string $image image name
314
+     * @return string the url
315
+     * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->imagePath($app, $image)
316
+     * @since 4.0.0
317
+     */
318
+    public static function imagePath( $app, $image ) {
319
+        return \OC::$server->getURLGenerator()->imagePath($app, $image);
320
+    }
321
+
322
+    /**
323
+     * Make a human file size (2048 to 2 kB)
324
+     * @param int $bytes file size in bytes
325
+     * @return string a human readable file size
326
+     * @since 4.0.0
327
+     */
328
+    public static function humanFileSize($bytes) {
329
+        return \OC_Helper::humanFileSize($bytes);
330
+    }
331
+
332
+    /**
333
+     * Make a computer file size (2 kB to 2048)
334
+     * @param string $str file size in a fancy format
335
+     * @return float a file size in bytes
336
+     *
337
+     * Inspired by: http://www.php.net/manual/en/function.filesize.php#92418
338
+     * @since 4.0.0
339
+     */
340
+    public static function computerFileSize($str) {
341
+        return \OC_Helper::computerFileSize($str);
342
+    }
343
+
344
+    /**
345
+     * connects a function to a hook
346
+     *
347
+     * @param string $signalClass class name of emitter
348
+     * @param string $signalName name of signal
349
+     * @param string|object $slotClass class name of slot
350
+     * @param string $slotName name of slot
351
+     * @return bool
352
+     *
353
+     * This function makes it very easy to connect to use hooks.
354
+     *
355
+     * TODO: write example
356
+     * @since 4.0.0
357
+     */
358
+    static public function connectHook($signalClass, $signalName, $slotClass, $slotName) {
359
+        return \OC_Hook::connect($signalClass, $signalName, $slotClass, $slotName);
360
+    }
361
+
362
+    /**
363
+     * Emits a signal. To get data from the slot use references!
364
+     * @param string $signalclass class name of emitter
365
+     * @param string $signalname name of signal
366
+     * @param array $params default: array() array with additional data
367
+     * @return bool true if slots exists or false if not
368
+     *
369
+     * TODO: write example
370
+     * @since 4.0.0
371
+     */
372
+    static public function emitHook($signalclass, $signalname, $params = array()) {
373
+        return \OC_Hook::emit($signalclass, $signalname, $params);
374
+    }
375
+
376
+    /**
377
+     * Cached encrypted CSRF token. Some static unit-tests of ownCloud compare
378
+     * multiple OC_Template elements which invoke `callRegister`. If the value
379
+     * would not be cached these unit-tests would fail.
380
+     * @var string
381
+     */
382
+    private static $token = '';
383
+
384
+    /**
385
+     * Register an get/post call. This is important to prevent CSRF attacks
386
+     * @since 4.5.0
387
+     */
388
+    public static function callRegister() {
389
+        if(self::$token === '') {
390
+            self::$token = \OC::$server->getCsrfTokenManager()->getToken()->getEncryptedValue();
391
+        }
392
+        return self::$token;
393
+    }
394
+
395
+    /**
396
+     * Check an ajax get/post call if the request token is valid. exit if not.
397
+     * @since 4.5.0
398
+     * @deprecated 9.0.0 Use annotations based on the app framework.
399
+     */
400
+    public static function callCheck() {
401
+        if(!\OC::$server->getRequest()->passesStrictCookieCheck()) {
402
+            header('Location: '.\OC::$WEBROOT);
403
+            exit();
404
+        }
405
+
406
+        if (!\OC::$server->getRequest()->passesCSRFCheck()) {
407
+            exit();
408
+        }
409
+    }
410
+
411
+    /**
412
+     * Used to sanitize HTML
413
+     *
414
+     * This function is used to sanitize HTML and should be applied on any
415
+     * string or array of strings before displaying it on a web page.
416
+     *
417
+     * @param string|array $value
418
+     * @return string|array an array of sanitized strings or a single sanitized string, depends on the input parameter.
419
+     * @since 4.5.0
420
+     */
421
+    public static function sanitizeHTML($value) {
422
+        return \OC_Util::sanitizeHTML($value);
423
+    }
424
+
425
+    /**
426
+     * Public function to encode url parameters
427
+     *
428
+     * This function is used to encode path to file before output.
429
+     * Encoding is done according to RFC 3986 with one exception:
430
+     * Character '/' is preserved as is.
431
+     *
432
+     * @param string $component part of URI to encode
433
+     * @return string
434
+     * @since 6.0.0
435
+     */
436
+    public static function encodePath($component) {
437
+        return \OC_Util::encodePath($component);
438
+    }
439
+
440
+    /**
441
+     * Returns an array with all keys from input lowercased or uppercased. Numbered indices are left as is.
442
+     *
443
+     * @param array $input The array to work on
444
+     * @param int $case Either MB_CASE_UPPER or MB_CASE_LOWER (default)
445
+     * @param string $encoding The encoding parameter is the character encoding. Defaults to UTF-8
446
+     * @return array
447
+     * @since 4.5.0
448
+     */
449
+    public static function mb_array_change_key_case($input, $case = MB_CASE_LOWER, $encoding = 'UTF-8') {
450
+        return \OC_Helper::mb_array_change_key_case($input, $case, $encoding);
451
+    }
452
+
453
+    /**
454
+     * replaces a copy of string delimited by the start and (optionally) length parameters with the string given in replacement.
455
+     *
456
+     * @param string $string The input string. Opposite to the PHP build-in function does not accept an array.
457
+     * @param string $replacement The replacement string.
458
+     * @param int $start If start is positive, the replacing will begin at the start'th offset into string. If start is negative, the replacing will begin at the start'th character from the end of string.
459
+     * @param int $length Length of the part to be replaced
460
+     * @param string $encoding The encoding parameter is the character encoding. Defaults to UTF-8
461
+     * @return string
462
+     * @since 4.5.0
463
+     * @deprecated 8.2.0 Use substr_replace() instead.
464
+     */
465
+    public static function mb_substr_replace($string, $replacement, $start, $length = null, $encoding = 'UTF-8') {
466
+        return substr_replace($string, $replacement, $start, $length);
467
+    }
468
+
469
+    /**
470
+     * Replace all occurrences of the search string with the replacement string
471
+     *
472
+     * @param string $search The value being searched for, otherwise known as the needle. String.
473
+     * @param string $replace The replacement string.
474
+     * @param string $subject The string or array being searched and replaced on, otherwise known as the haystack.
475
+     * @param string $encoding The encoding parameter is the character encoding. Defaults to UTF-8
476
+     * @param int $count If passed, this will be set to the number of replacements performed.
477
+     * @return string
478
+     * @since 4.5.0
479
+     * @deprecated 8.2.0 Use str_replace() instead.
480
+     */
481
+    public static function mb_str_replace($search, $replace, $subject, $encoding = 'UTF-8', &$count = null) {
482
+        return str_replace($search, $replace, $subject, $count);
483
+    }
484
+
485
+    /**
486
+     * performs a search in a nested array
487
+     *
488
+     * @param array $haystack the array to be searched
489
+     * @param string $needle the search string
490
+     * @param mixed $index optional, only search this key name
491
+     * @return mixed the key of the matching field, otherwise false
492
+     * @since 4.5.0
493
+     */
494
+    public static function recursiveArraySearch($haystack, $needle, $index = null) {
495
+        return \OC_Helper::recursiveArraySearch($haystack, $needle, $index);
496
+    }
497
+
498
+    /**
499
+     * calculates the maximum upload size respecting system settings, free space and user quota
500
+     *
501
+     * @param string $dir the current folder where the user currently operates
502
+     * @param int $free the number of bytes free on the storage holding $dir, if not set this will be received from the storage directly
503
+     * @return int number of bytes representing
504
+     * @since 5.0.0
505
+     */
506
+    public static function maxUploadFilesize($dir, $free = null) {
507
+        return \OC_Helper::maxUploadFilesize($dir, $free);
508
+    }
509
+
510
+    /**
511
+     * Calculate free space left within user quota
512
+     * @param string $dir the current folder where the user currently operates
513
+     * @return int number of bytes representing
514
+     * @since 7.0.0
515
+     */
516
+    public static function freeSpace($dir) {
517
+        return \OC_Helper::freeSpace($dir);
518
+    }
519
+
520
+    /**
521
+     * Calculate PHP upload limit
522
+     *
523
+     * @return int number of bytes representing
524
+     * @since 7.0.0
525
+     */
526
+    public static function uploadLimit() {
527
+        return \OC_Helper::uploadLimit();
528
+    }
529
+
530
+    /**
531
+     * Returns whether the given file name is valid
532
+     * @param string $file file name to check
533
+     * @return bool true if the file name is valid, false otherwise
534
+     * @deprecated 8.1.0 use \OC\Files\View::verifyPath()
535
+     * @since 7.0.0
536
+     * @suppress PhanDeprecatedFunction
537
+     */
538
+    public static function isValidFileName($file) {
539
+        return \OC_Util::isValidFileName($file);
540
+    }
541
+
542
+    /**
543
+     * Compare two strings to provide a natural sort
544
+     * @param string $a first string to compare
545
+     * @param string $b second string to compare
546
+     * @return int -1 if $b comes before $a, 1 if $a comes before $b
547
+     * or 0 if the strings are identical
548
+     * @since 7.0.0
549
+     */
550
+    public static function naturalSortCompare($a, $b) {
551
+        return \OC\NaturalSort::getInstance()->compare($a, $b);
552
+    }
553
+
554
+    /**
555
+     * check if a password is required for each public link
556
+     * @return boolean
557
+     * @since 7.0.0
558
+     */
559
+    public static function isPublicLinkPasswordRequired() {
560
+        return \OC_Util::isPublicLinkPasswordRequired();
561
+    }
562
+
563
+    /**
564
+     * check if share API enforces a default expire date
565
+     * @return boolean
566
+     * @since 8.0.0
567
+     */
568
+    public static function isDefaultExpireDateEnforced() {
569
+        return \OC_Util::isDefaultExpireDateEnforced();
570
+    }
571
+
572
+    protected static $needUpgradeCache = null;
573
+
574
+    /**
575
+     * Checks whether the current version needs upgrade.
576
+     *
577
+     * @return bool true if upgrade is needed, false otherwise
578
+     * @since 7.0.0
579
+     */
580
+    public static function needUpgrade() {
581
+        if (!isset(self::$needUpgradeCache)) {
582
+            self::$needUpgradeCache=\OC_Util::needUpgrade(\OC::$server->getSystemConfig());
583
+        }		
584
+        return self::$needUpgradeCache;
585
+    }
586 586
 }
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
  */
59 59
 class Util {
60 60
 	// consts for Logging
61
-	const DEBUG=0;
62
-	const INFO=1;
63
-	const WARN=2;
64
-	const ERROR=3;
65
-	const FATAL=4;
61
+	const DEBUG = 0;
62
+	const INFO = 1;
63
+	const WARN = 2;
64
+	const ERROR = 3;
65
+	const FATAL = 4;
66 66
 
67 67
 	/** \OCP\Share\IManager */
68 68
 	private static $shareManager;
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	 * @since 4.0.0
103 103
 	 * @deprecated 13.0.0 use log of \OCP\ILogger
104 104
 	 */
105
-	public static function writeLog( $app, $message, $level ) {
105
+	public static function writeLog($app, $message, $level) {
106 106
 		$context = ['app' => $app];
107 107
 		\OC::$server->getLogger()->log($level, $message, $context);
108 108
 	}
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * @since ....0.0 - parameter $level was added in 7.0.0
116 116
 	 * @deprecated 8.2.0 use logException of \OCP\ILogger
117 117
 	 */
118
-	public static function logException( $app, \Exception $ex, $level = \OCP\Util::FATAL ) {
118
+	public static function logException($app, \Exception $ex, $level = \OCP\Util::FATAL) {
119 119
 		\OC::$server->getLogger()->logException($ex, ['app' => $app]);
120 120
 	}
121 121
 
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
 	 * @param string $file
157 157
 	 * @since 4.0.0
158 158
 	 */
159
-	public static function addStyle( $application, $file = null ) {
160
-		\OC_Util::addStyle( $application, $file );
159
+	public static function addStyle($application, $file = null) {
160
+		\OC_Util::addStyle($application, $file);
161 161
 	}
162 162
 
163 163
 	/**
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
 	 * @param string $file
167 167
 	 * @since 4.0.0
168 168
 	 */
169
-	public static function addScript( $application, $file = null ) {
170
-		\OC_Util::addScript( $application, $file );
169
+	public static function addScript($application, $file = null) {
170
+		\OC_Util::addScript($application, $file);
171 171
 	}
172 172
 
173 173
 	/**
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 	 * @param string $text the text content for the element
190 190
 	 * @since 4.0.0
191 191
 	 */
192
-	public static function addHeader($tag, $attributes, $text=null) {
192
+	public static function addHeader($tag, $attributes, $text = null) {
193 193
 		\OC_Util::addHeader($tag, $attributes, $text);
194 194
 	}
195 195
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 	 * @return string the url
203 203
 	 * @since 4.0.0 - parameter $args was added in 4.5.0
204 204
 	 */
205
-	public static function linkToAbsolute( $app, $file, $args = array() ) {
205
+	public static function linkToAbsolute($app, $file, $args = array()) {
206 206
 		$urlGenerator = \OC::$server->getURLGenerator();
207 207
 		return $urlGenerator->getAbsoluteURL(
208 208
 			$urlGenerator->linkTo($app, $file, $args)
@@ -215,11 +215,11 @@  discard block
 block discarded – undo
215 215
 	 * @return string the url
216 216
 	 * @since 4.0.0
217 217
 	 */
218
-	public static function linkToRemote( $service ) {
218
+	public static function linkToRemote($service) {
219 219
 		$urlGenerator = \OC::$server->getURLGenerator();
220
-		$remoteBase = $urlGenerator->linkTo('', 'remote.php') . '/' . $service;
220
+		$remoteBase = $urlGenerator->linkTo('', 'remote.php').'/'.$service;
221 221
 		return $urlGenerator->getAbsoluteURL(
222
-			$remoteBase . (($service[strlen($service) - 1] != '/') ? '/' : '')
222
+			$remoteBase.(($service[strlen($service) - 1] != '/') ? '/' : '')
223 223
 		);
224 224
 	}
225 225
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 	 * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->linkToRoute($route, $parameters)
243 243
 	 * @since 5.0.0
244 244
 	 */
245
-	public static function linkToRoute( $route, $parameters = array() ) {
245
+	public static function linkToRoute($route, $parameters = array()) {
246 246
 		return \OC::$server->getURLGenerator()->linkToRoute($route, $parameters);
247 247
 	}
248 248
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 	 * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->linkTo($app, $file, $args)
257 257
 	 * @since 4.0.0 - parameter $args was added in 4.5.0
258 258
 	 */
259
-	public static function linkTo( $app, $file, $args = array() ) {
259
+	public static function linkTo($app, $file, $args = array()) {
260 260
 		return \OC::$server->getURLGenerator()->linkTo($app, $file, $args);
261 261
 	}
262 262
 
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 	 * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->imagePath($app, $image)
316 316
 	 * @since 4.0.0
317 317
 	 */
318
-	public static function imagePath( $app, $image ) {
318
+	public static function imagePath($app, $image) {
319 319
 		return \OC::$server->getURLGenerator()->imagePath($app, $image);
320 320
 	}
321 321
 
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 	 * @since 4.5.0
387 387
 	 */
388 388
 	public static function callRegister() {
389
-		if(self::$token === '') {
389
+		if (self::$token === '') {
390 390
 			self::$token = \OC::$server->getCsrfTokenManager()->getToken()->getEncryptedValue();
391 391
 		}
392 392
 		return self::$token;
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 	 * @deprecated 9.0.0 Use annotations based on the app framework.
399 399
 	 */
400 400
 	public static function callCheck() {
401
-		if(!\OC::$server->getRequest()->passesStrictCookieCheck()) {
401
+		if (!\OC::$server->getRequest()->passesStrictCookieCheck()) {
402 402
 			header('Location: '.\OC::$WEBROOT);
403 403
 			exit();
404 404
 		}
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
 	 */
580 580
 	public static function needUpgrade() {
581 581
 		if (!isset(self::$needUpgradeCache)) {
582
-			self::$needUpgradeCache=\OC_Util::needUpgrade(\OC::$server->getSystemConfig());
582
+			self::$needUpgradeCache = \OC_Util::needUpgrade(\OC::$server->getSystemConfig());
583 583
 		}		
584 584
 		return self::$needUpgradeCache;
585 585
 	}
Please login to merge, or discard this patch.
lib/public/IServerContainer.php 1 patch
Indentation   +496 added lines, -496 removed lines patch added patch discarded remove patch
@@ -57,500 +57,500 @@
 block discarded – undo
57 57
  */
58 58
 interface IServerContainer extends IContainer {
59 59
 
60
-	/**
61
-	 * The calendar manager will act as a broker between consumers for calendar information and
62
-	 * providers which actual deliver the calendar information.
63
-	 *
64
-	 * @return \OCP\Calendar\IManager
65
-	 * @since 13.0.0
66
-	 */
67
-	public function getCalendarManager();
68
-
69
-	/**
70
-	 * The contacts manager will act as a broker between consumers for contacts information and
71
-	 * providers which actual deliver the contact information.
72
-	 *
73
-	 * @return \OCP\Contacts\IManager
74
-	 * @since 6.0.0
75
-	 */
76
-	public function getContactsManager();
77
-
78
-	/**
79
-	 * The current request object holding all information about the request currently being processed
80
-	 * is returned from this method.
81
-	 * In case the current execution was not initiated by a web request null is returned
82
-	 *
83
-	 * @return \OCP\IRequest
84
-	 * @since 6.0.0
85
-	 */
86
-	public function getRequest();
87
-
88
-	/**
89
-	 * Returns the preview manager which can create preview images for a given file
90
-	 *
91
-	 * @return \OCP\IPreview
92
-	 * @since 6.0.0
93
-	 */
94
-	public function getPreviewManager();
95
-
96
-	/**
97
-	 * Returns the tag manager which can get and set tags for different object types
98
-	 *
99
-	 * @see \OCP\ITagManager::load()
100
-	 * @return \OCP\ITagManager
101
-	 * @since 6.0.0
102
-	 */
103
-	public function getTagManager();
104
-
105
-	/**
106
-	 * Returns the root folder of ownCloud's data directory
107
-	 *
108
-	 * @return \OCP\Files\IRootFolder
109
-	 * @since 6.0.0 - between 6.0.0 and 8.0.0 this returned \OCP\Files\Folder
110
-	 */
111
-	public function getRootFolder();
112
-
113
-	/**
114
-	 * Returns a view to ownCloud's files folder
115
-	 *
116
-	 * @param string $userId user ID
117
-	 * @return \OCP\Files\Folder
118
-	 * @since 6.0.0 - parameter $userId was added in 8.0.0
119
-	 * @see getUserFolder in \OCP\Files\IRootFolder
120
-	 */
121
-	public function getUserFolder($userId = null);
122
-
123
-	/**
124
-	 * Returns an app-specific view in ownClouds data directory
125
-	 *
126
-	 * @return \OCP\Files\Folder
127
-	 * @since 6.0.0
128
-	 * @deprecated 9.2.0 use IAppData
129
-	 */
130
-	public function getAppFolder();
131
-
132
-	/**
133
-	 * Returns a user manager
134
-	 *
135
-	 * @return \OCP\IUserManager
136
-	 * @since 8.0.0
137
-	 */
138
-	public function getUserManager();
139
-
140
-	/**
141
-	 * Returns a group manager
142
-	 *
143
-	 * @return \OCP\IGroupManager
144
-	 * @since 8.0.0
145
-	 */
146
-	public function getGroupManager();
147
-
148
-	/**
149
-	 * Returns the user session
150
-	 *
151
-	 * @return \OCP\IUserSession
152
-	 * @since 6.0.0
153
-	 */
154
-	public function getUserSession();
155
-
156
-	/**
157
-	 * Returns the navigation manager
158
-	 *
159
-	 * @return \OCP\INavigationManager
160
-	 * @since 6.0.0
161
-	 */
162
-	public function getNavigationManager();
163
-
164
-	/**
165
-	 * Returns the config manager
166
-	 *
167
-	 * @return \OCP\IConfig
168
-	 * @since 6.0.0
169
-	 */
170
-	public function getConfig();
171
-
172
-	/**
173
-	 * Returns a Crypto instance
174
-	 *
175
-	 * @return \OCP\Security\ICrypto
176
-	 * @since 8.0.0
177
-	 */
178
-	public function getCrypto();
179
-
180
-	/**
181
-	 * Returns a Hasher instance
182
-	 *
183
-	 * @return \OCP\Security\IHasher
184
-	 * @since 8.0.0
185
-	 */
186
-	public function getHasher();
187
-
188
-	/**
189
-	 * Returns a SecureRandom instance
190
-	 *
191
-	 * @return \OCP\Security\ISecureRandom
192
-	 * @since 8.1.0
193
-	 */
194
-	public function getSecureRandom();
195
-
196
-	/**
197
-	 * Returns a CredentialsManager instance
198
-	 *
199
-	 * @return \OCP\Security\ICredentialsManager
200
-	 * @since 9.0.0
201
-	 */
202
-	public function getCredentialsManager();
203
-
204
-	/**
205
-	 * Returns the app config manager
206
-	 *
207
-	 * @return \OCP\IAppConfig
208
-	 * @since 7.0.0
209
-	 */
210
-	public function getAppConfig();
211
-
212
-	/**
213
-	 * @return \OCP\L10N\IFactory
214
-	 * @since 8.2.0
215
-	 */
216
-	public function getL10NFactory();
217
-
218
-	/**
219
-	 * get an L10N instance
220
-	 * @param string $app appid
221
-	 * @param string $lang
222
-	 * @return \OCP\IL10N
223
-	 * @since 6.0.0 - parameter $lang was added in 8.0.0
224
-	 */
225
-	public function getL10N($app, $lang = null);
226
-
227
-	/**
228
-	 * @return \OC\Encryption\Manager
229
-	 * @since 8.1.0
230
-	 */
231
-	public function getEncryptionManager();
232
-
233
-	/**
234
-	 * @return \OC\Encryption\File
235
-	 * @since 8.1.0
236
-	 */
237
-	public function getEncryptionFilesHelper();
238
-
239
-	/**
240
-	 * @return \OCP\Encryption\Keys\IStorage
241
-	 * @since 8.1.0
242
-	 */
243
-	public function getEncryptionKeyStorage();
244
-
245
-	/**
246
-	 * Returns the URL generator
247
-	 *
248
-	 * @return \OCP\IURLGenerator
249
-	 * @since 6.0.0
250
-	 */
251
-	public function getURLGenerator();
252
-
253
-	/**
254
-	 * Returns the Helper
255
-	 *
256
-	 * @return \OCP\IHelper
257
-	 * @since 6.0.0
258
-	 */
259
-	public function getHelper();
260
-
261
-	/**
262
-	 * Returns an ICache instance
263
-	 *
264
-	 * @return \OCP\ICache
265
-	 * @since 6.0.0
266
-	 */
267
-	public function getCache();
268
-
269
-	/**
270
-	 * Returns an \OCP\CacheFactory instance
271
-	 *
272
-	 * @return \OCP\ICacheFactory
273
-	 * @since 7.0.0
274
-	 */
275
-	public function getMemCacheFactory();
276
-
277
-	/**
278
-	 * Returns the current session
279
-	 *
280
-	 * @return \OCP\ISession
281
-	 * @since 6.0.0
282
-	 */
283
-	public function getSession();
284
-
285
-	/**
286
-	 * Returns the activity manager
287
-	 *
288
-	 * @return \OCP\Activity\IManager
289
-	 * @since 6.0.0
290
-	 */
291
-	public function getActivityManager();
292
-
293
-	/**
294
-	 * Returns the current session
295
-	 *
296
-	 * @return \OCP\IDBConnection
297
-	 * @since 6.0.0
298
-	 */
299
-	public function getDatabaseConnection();
300
-
301
-	/**
302
-	 * Returns an avatar manager, used for avatar functionality
303
-	 *
304
-	 * @return \OCP\IAvatarManager
305
-	 * @since 6.0.0
306
-	 */
307
-	public function getAvatarManager();
308
-
309
-	/**
310
-	 * Returns an job list for controlling background jobs
311
-	 *
312
-	 * @return \OCP\BackgroundJob\IJobList
313
-	 * @since 7.0.0
314
-	 */
315
-	public function getJobList();
316
-
317
-	/**
318
-	 * Returns a logger instance
319
-	 *
320
-	 * @return \OCP\ILogger
321
-	 * @since 8.0.0
322
-	 */
323
-	public function getLogger();
324
-
325
-	/**
326
-	 * Returns a router for generating and matching urls
327
-	 *
328
-	 * @return \OCP\Route\IRouter
329
-	 * @since 7.0.0
330
-	 */
331
-	public function getRouter();
332
-
333
-	/**
334
-	 * Returns a search instance
335
-	 *
336
-	 * @return \OCP\ISearch
337
-	 * @since 7.0.0
338
-	 */
339
-	public function getSearch();
340
-
341
-	/**
342
-	 * Get the certificate manager for the user
343
-	 *
344
-	 * @param string $userId (optional) if not specified the current loggedin user is used, use null to get the system certificate manager
345
-	 * @return \OCP\ICertificateManager | null if $userId is null and no user is logged in
346
-	 * @since 8.0.0
347
-	 */
348
-	public function getCertificateManager($userId = null);
349
-
350
-	/**
351
-	 * Create a new event source
352
-	 *
353
-	 * @return \OCP\IEventSource
354
-	 * @since 8.0.0
355
-	 */
356
-	public function createEventSource();
357
-
358
-	/**
359
-	 * Returns an instance of the HTTP helper class
360
-	 * @return \OC\HTTPHelper
361
-	 * @deprecated 8.1.0 Use \OCP\Http\Client\IClientService
362
-	 * @since 8.0.0
363
-	 */
364
-	public function getHTTPHelper();
365
-
366
-	/**
367
-	 * Returns an instance of the HTTP client service
368
-	 *
369
-	 * @return \OCP\Http\Client\IClientService
370
-	 * @since 8.1.0
371
-	 */
372
-	public function getHTTPClientService();
373
-
374
-	/**
375
-	 * Get the active event logger
376
-	 *
377
-	 * @return \OCP\Diagnostics\IEventLogger
378
-	 * @since 8.0.0
379
-	 */
380
-	public function getEventLogger();
381
-
382
-	/**
383
-	 * Get the active query logger
384
-	 *
385
-	 * The returned logger only logs data when debug mode is enabled
386
-	 *
387
-	 * @return \OCP\Diagnostics\IQueryLogger
388
-	 * @since 8.0.0
389
-	 */
390
-	public function getQueryLogger();
391
-
392
-	/**
393
-	 * Get the manager for temporary files and folders
394
-	 *
395
-	 * @return \OCP\ITempManager
396
-	 * @since 8.0.0
397
-	 */
398
-	public function getTempManager();
399
-
400
-	/**
401
-	 * Get the app manager
402
-	 *
403
-	 * @return \OCP\App\IAppManager
404
-	 * @since 8.0.0
405
-	 */
406
-	public function getAppManager();
407
-
408
-	/**
409
-	 * Get the webroot
410
-	 *
411
-	 * @return string
412
-	 * @since 8.0.0
413
-	 */
414
-	public function getWebRoot();
415
-
416
-	/**
417
-	 * @return \OCP\Files\Config\IMountProviderCollection
418
-	 * @since 8.0.0
419
-	 */
420
-	public function getMountProviderCollection();
421
-
422
-	/**
423
-	 * Get the IniWrapper
424
-	 *
425
-	 * @return \bantu\IniGetWrapper\IniGetWrapper
426
-	 * @since 8.0.0
427
-	 */
428
-	public function getIniWrapper();
429
-	/**
430
-	 * @return \OCP\Command\IBus
431
-	 * @since 8.1.0
432
-	 */
433
-	public function getCommandBus();
434
-
435
-	/**
436
-	 * Creates a new mailer
437
-	 *
438
-	 * @return \OCP\Mail\IMailer
439
-	 * @since 8.1.0
440
-	 */
441
-	public function getMailer();
442
-
443
-	/**
444
-	 * Get the locking provider
445
-	 *
446
-	 * @return \OCP\Lock\ILockingProvider
447
-	 * @since 8.1.0
448
-	 */
449
-	public function getLockingProvider();
450
-
451
-	/**
452
-	 * @return \OCP\Files\Mount\IMountManager
453
-	 * @since 8.2.0
454
-	 */
455
-	public function getMountManager();
456
-
457
-	/**
458
-	 * Get the MimeTypeDetector
459
-	 *
460
-	 * @return \OCP\Files\IMimeTypeDetector
461
-	 * @since 8.2.0
462
-	 */
463
-	public function getMimeTypeDetector();
464
-
465
-	/**
466
-	 * Get the MimeTypeLoader
467
-	 *
468
-	 * @return \OCP\Files\IMimeTypeLoader
469
-	 * @since 8.2.0
470
-	 */
471
-	public function getMimeTypeLoader();
472
-
473
-	/**
474
-	 * Get the EventDispatcher
475
-	 *
476
-	 * @return EventDispatcherInterface
477
-	 * @since 8.2.0
478
-	 */
479
-	public function getEventDispatcher();
480
-
481
-	/**
482
-	 * Get the Notification Manager
483
-	 *
484
-	 * @return \OCP\Notification\IManager
485
-	 * @since 9.0.0
486
-	 */
487
-	public function getNotificationManager();
488
-
489
-	/**
490
-	 * @return \OCP\Comments\ICommentsManager
491
-	 * @since 9.0.0
492
-	 */
493
-	public function getCommentsManager();
494
-
495
-	/**
496
-	 * Returns the system-tag manager
497
-	 *
498
-	 * @return \OCP\SystemTag\ISystemTagManager
499
-	 *
500
-	 * @since 9.0.0
501
-	 */
502
-	public function getSystemTagManager();
503
-
504
-	/**
505
-	 * Returns the system-tag object mapper
506
-	 *
507
-	 * @return \OCP\SystemTag\ISystemTagObjectMapper
508
-	 *
509
-	 * @since 9.0.0
510
-	 */
511
-	public function getSystemTagObjectMapper();
512
-
513
-	/**
514
-	 * Returns the share manager
515
-	 *
516
-	 * @return \OCP\Share\IManager
517
-	 * @since 9.0.0
518
-	 */
519
-	public function getShareManager();
520
-
521
-	/**
522
-	 * @return IContentSecurityPolicyManager
523
-	 * @since 9.0.0
524
-	 */
525
-	public function getContentSecurityPolicyManager();
526
-
527
-	/**
528
-	 * @return \OCP\IDateTimeZone
529
-	 * @since 8.0.0
530
-	 */
531
-	public function getDateTimeZone();
532
-
533
-	/**
534
-	 * @return \OCP\IDateTimeFormatter
535
-	 * @since 8.0.0
536
-	 */
537
-	public function getDateTimeFormatter();
538
-
539
-	/**
540
-	 * @return \OCP\Federation\ICloudIdManager
541
-	 * @since 12.0.0
542
-	 */
543
-	public function getCloudIdManager();
544
-
545
-	/**
546
-	 * @return \OCP\Remote\Api\IApiFactory
547
-	 * @since 13.0.0
548
-	 */
549
-	public function getRemoteApiFactory();
550
-
551
-	/**
552
-	 * @return \OCP\Remote\IInstanceFactory
553
-	 * @since 13.0.0
554
-	 */
555
-	public function getRemoteInstanceFactory();
60
+    /**
61
+     * The calendar manager will act as a broker between consumers for calendar information and
62
+     * providers which actual deliver the calendar information.
63
+     *
64
+     * @return \OCP\Calendar\IManager
65
+     * @since 13.0.0
66
+     */
67
+    public function getCalendarManager();
68
+
69
+    /**
70
+     * The contacts manager will act as a broker between consumers for contacts information and
71
+     * providers which actual deliver the contact information.
72
+     *
73
+     * @return \OCP\Contacts\IManager
74
+     * @since 6.0.0
75
+     */
76
+    public function getContactsManager();
77
+
78
+    /**
79
+     * The current request object holding all information about the request currently being processed
80
+     * is returned from this method.
81
+     * In case the current execution was not initiated by a web request null is returned
82
+     *
83
+     * @return \OCP\IRequest
84
+     * @since 6.0.0
85
+     */
86
+    public function getRequest();
87
+
88
+    /**
89
+     * Returns the preview manager which can create preview images for a given file
90
+     *
91
+     * @return \OCP\IPreview
92
+     * @since 6.0.0
93
+     */
94
+    public function getPreviewManager();
95
+
96
+    /**
97
+     * Returns the tag manager which can get and set tags for different object types
98
+     *
99
+     * @see \OCP\ITagManager::load()
100
+     * @return \OCP\ITagManager
101
+     * @since 6.0.0
102
+     */
103
+    public function getTagManager();
104
+
105
+    /**
106
+     * Returns the root folder of ownCloud's data directory
107
+     *
108
+     * @return \OCP\Files\IRootFolder
109
+     * @since 6.0.0 - between 6.0.0 and 8.0.0 this returned \OCP\Files\Folder
110
+     */
111
+    public function getRootFolder();
112
+
113
+    /**
114
+     * Returns a view to ownCloud's files folder
115
+     *
116
+     * @param string $userId user ID
117
+     * @return \OCP\Files\Folder
118
+     * @since 6.0.0 - parameter $userId was added in 8.0.0
119
+     * @see getUserFolder in \OCP\Files\IRootFolder
120
+     */
121
+    public function getUserFolder($userId = null);
122
+
123
+    /**
124
+     * Returns an app-specific view in ownClouds data directory
125
+     *
126
+     * @return \OCP\Files\Folder
127
+     * @since 6.0.0
128
+     * @deprecated 9.2.0 use IAppData
129
+     */
130
+    public function getAppFolder();
131
+
132
+    /**
133
+     * Returns a user manager
134
+     *
135
+     * @return \OCP\IUserManager
136
+     * @since 8.0.0
137
+     */
138
+    public function getUserManager();
139
+
140
+    /**
141
+     * Returns a group manager
142
+     *
143
+     * @return \OCP\IGroupManager
144
+     * @since 8.0.0
145
+     */
146
+    public function getGroupManager();
147
+
148
+    /**
149
+     * Returns the user session
150
+     *
151
+     * @return \OCP\IUserSession
152
+     * @since 6.0.0
153
+     */
154
+    public function getUserSession();
155
+
156
+    /**
157
+     * Returns the navigation manager
158
+     *
159
+     * @return \OCP\INavigationManager
160
+     * @since 6.0.0
161
+     */
162
+    public function getNavigationManager();
163
+
164
+    /**
165
+     * Returns the config manager
166
+     *
167
+     * @return \OCP\IConfig
168
+     * @since 6.0.0
169
+     */
170
+    public function getConfig();
171
+
172
+    /**
173
+     * Returns a Crypto instance
174
+     *
175
+     * @return \OCP\Security\ICrypto
176
+     * @since 8.0.0
177
+     */
178
+    public function getCrypto();
179
+
180
+    /**
181
+     * Returns a Hasher instance
182
+     *
183
+     * @return \OCP\Security\IHasher
184
+     * @since 8.0.0
185
+     */
186
+    public function getHasher();
187
+
188
+    /**
189
+     * Returns a SecureRandom instance
190
+     *
191
+     * @return \OCP\Security\ISecureRandom
192
+     * @since 8.1.0
193
+     */
194
+    public function getSecureRandom();
195
+
196
+    /**
197
+     * Returns a CredentialsManager instance
198
+     *
199
+     * @return \OCP\Security\ICredentialsManager
200
+     * @since 9.0.0
201
+     */
202
+    public function getCredentialsManager();
203
+
204
+    /**
205
+     * Returns the app config manager
206
+     *
207
+     * @return \OCP\IAppConfig
208
+     * @since 7.0.0
209
+     */
210
+    public function getAppConfig();
211
+
212
+    /**
213
+     * @return \OCP\L10N\IFactory
214
+     * @since 8.2.0
215
+     */
216
+    public function getL10NFactory();
217
+
218
+    /**
219
+     * get an L10N instance
220
+     * @param string $app appid
221
+     * @param string $lang
222
+     * @return \OCP\IL10N
223
+     * @since 6.0.0 - parameter $lang was added in 8.0.0
224
+     */
225
+    public function getL10N($app, $lang = null);
226
+
227
+    /**
228
+     * @return \OC\Encryption\Manager
229
+     * @since 8.1.0
230
+     */
231
+    public function getEncryptionManager();
232
+
233
+    /**
234
+     * @return \OC\Encryption\File
235
+     * @since 8.1.0
236
+     */
237
+    public function getEncryptionFilesHelper();
238
+
239
+    /**
240
+     * @return \OCP\Encryption\Keys\IStorage
241
+     * @since 8.1.0
242
+     */
243
+    public function getEncryptionKeyStorage();
244
+
245
+    /**
246
+     * Returns the URL generator
247
+     *
248
+     * @return \OCP\IURLGenerator
249
+     * @since 6.0.0
250
+     */
251
+    public function getURLGenerator();
252
+
253
+    /**
254
+     * Returns the Helper
255
+     *
256
+     * @return \OCP\IHelper
257
+     * @since 6.0.0
258
+     */
259
+    public function getHelper();
260
+
261
+    /**
262
+     * Returns an ICache instance
263
+     *
264
+     * @return \OCP\ICache
265
+     * @since 6.0.0
266
+     */
267
+    public function getCache();
268
+
269
+    /**
270
+     * Returns an \OCP\CacheFactory instance
271
+     *
272
+     * @return \OCP\ICacheFactory
273
+     * @since 7.0.0
274
+     */
275
+    public function getMemCacheFactory();
276
+
277
+    /**
278
+     * Returns the current session
279
+     *
280
+     * @return \OCP\ISession
281
+     * @since 6.0.0
282
+     */
283
+    public function getSession();
284
+
285
+    /**
286
+     * Returns the activity manager
287
+     *
288
+     * @return \OCP\Activity\IManager
289
+     * @since 6.0.0
290
+     */
291
+    public function getActivityManager();
292
+
293
+    /**
294
+     * Returns the current session
295
+     *
296
+     * @return \OCP\IDBConnection
297
+     * @since 6.0.0
298
+     */
299
+    public function getDatabaseConnection();
300
+
301
+    /**
302
+     * Returns an avatar manager, used for avatar functionality
303
+     *
304
+     * @return \OCP\IAvatarManager
305
+     * @since 6.0.0
306
+     */
307
+    public function getAvatarManager();
308
+
309
+    /**
310
+     * Returns an job list for controlling background jobs
311
+     *
312
+     * @return \OCP\BackgroundJob\IJobList
313
+     * @since 7.0.0
314
+     */
315
+    public function getJobList();
316
+
317
+    /**
318
+     * Returns a logger instance
319
+     *
320
+     * @return \OCP\ILogger
321
+     * @since 8.0.0
322
+     */
323
+    public function getLogger();
324
+
325
+    /**
326
+     * Returns a router for generating and matching urls
327
+     *
328
+     * @return \OCP\Route\IRouter
329
+     * @since 7.0.0
330
+     */
331
+    public function getRouter();
332
+
333
+    /**
334
+     * Returns a search instance
335
+     *
336
+     * @return \OCP\ISearch
337
+     * @since 7.0.0
338
+     */
339
+    public function getSearch();
340
+
341
+    /**
342
+     * Get the certificate manager for the user
343
+     *
344
+     * @param string $userId (optional) if not specified the current loggedin user is used, use null to get the system certificate manager
345
+     * @return \OCP\ICertificateManager | null if $userId is null and no user is logged in
346
+     * @since 8.0.0
347
+     */
348
+    public function getCertificateManager($userId = null);
349
+
350
+    /**
351
+     * Create a new event source
352
+     *
353
+     * @return \OCP\IEventSource
354
+     * @since 8.0.0
355
+     */
356
+    public function createEventSource();
357
+
358
+    /**
359
+     * Returns an instance of the HTTP helper class
360
+     * @return \OC\HTTPHelper
361
+     * @deprecated 8.1.0 Use \OCP\Http\Client\IClientService
362
+     * @since 8.0.0
363
+     */
364
+    public function getHTTPHelper();
365
+
366
+    /**
367
+     * Returns an instance of the HTTP client service
368
+     *
369
+     * @return \OCP\Http\Client\IClientService
370
+     * @since 8.1.0
371
+     */
372
+    public function getHTTPClientService();
373
+
374
+    /**
375
+     * Get the active event logger
376
+     *
377
+     * @return \OCP\Diagnostics\IEventLogger
378
+     * @since 8.0.0
379
+     */
380
+    public function getEventLogger();
381
+
382
+    /**
383
+     * Get the active query logger
384
+     *
385
+     * The returned logger only logs data when debug mode is enabled
386
+     *
387
+     * @return \OCP\Diagnostics\IQueryLogger
388
+     * @since 8.0.0
389
+     */
390
+    public function getQueryLogger();
391
+
392
+    /**
393
+     * Get the manager for temporary files and folders
394
+     *
395
+     * @return \OCP\ITempManager
396
+     * @since 8.0.0
397
+     */
398
+    public function getTempManager();
399
+
400
+    /**
401
+     * Get the app manager
402
+     *
403
+     * @return \OCP\App\IAppManager
404
+     * @since 8.0.0
405
+     */
406
+    public function getAppManager();
407
+
408
+    /**
409
+     * Get the webroot
410
+     *
411
+     * @return string
412
+     * @since 8.0.0
413
+     */
414
+    public function getWebRoot();
415
+
416
+    /**
417
+     * @return \OCP\Files\Config\IMountProviderCollection
418
+     * @since 8.0.0
419
+     */
420
+    public function getMountProviderCollection();
421
+
422
+    /**
423
+     * Get the IniWrapper
424
+     *
425
+     * @return \bantu\IniGetWrapper\IniGetWrapper
426
+     * @since 8.0.0
427
+     */
428
+    public function getIniWrapper();
429
+    /**
430
+     * @return \OCP\Command\IBus
431
+     * @since 8.1.0
432
+     */
433
+    public function getCommandBus();
434
+
435
+    /**
436
+     * Creates a new mailer
437
+     *
438
+     * @return \OCP\Mail\IMailer
439
+     * @since 8.1.0
440
+     */
441
+    public function getMailer();
442
+
443
+    /**
444
+     * Get the locking provider
445
+     *
446
+     * @return \OCP\Lock\ILockingProvider
447
+     * @since 8.1.0
448
+     */
449
+    public function getLockingProvider();
450
+
451
+    /**
452
+     * @return \OCP\Files\Mount\IMountManager
453
+     * @since 8.2.0
454
+     */
455
+    public function getMountManager();
456
+
457
+    /**
458
+     * Get the MimeTypeDetector
459
+     *
460
+     * @return \OCP\Files\IMimeTypeDetector
461
+     * @since 8.2.0
462
+     */
463
+    public function getMimeTypeDetector();
464
+
465
+    /**
466
+     * Get the MimeTypeLoader
467
+     *
468
+     * @return \OCP\Files\IMimeTypeLoader
469
+     * @since 8.2.0
470
+     */
471
+    public function getMimeTypeLoader();
472
+
473
+    /**
474
+     * Get the EventDispatcher
475
+     *
476
+     * @return EventDispatcherInterface
477
+     * @since 8.2.0
478
+     */
479
+    public function getEventDispatcher();
480
+
481
+    /**
482
+     * Get the Notification Manager
483
+     *
484
+     * @return \OCP\Notification\IManager
485
+     * @since 9.0.0
486
+     */
487
+    public function getNotificationManager();
488
+
489
+    /**
490
+     * @return \OCP\Comments\ICommentsManager
491
+     * @since 9.0.0
492
+     */
493
+    public function getCommentsManager();
494
+
495
+    /**
496
+     * Returns the system-tag manager
497
+     *
498
+     * @return \OCP\SystemTag\ISystemTagManager
499
+     *
500
+     * @since 9.0.0
501
+     */
502
+    public function getSystemTagManager();
503
+
504
+    /**
505
+     * Returns the system-tag object mapper
506
+     *
507
+     * @return \OCP\SystemTag\ISystemTagObjectMapper
508
+     *
509
+     * @since 9.0.0
510
+     */
511
+    public function getSystemTagObjectMapper();
512
+
513
+    /**
514
+     * Returns the share manager
515
+     *
516
+     * @return \OCP\Share\IManager
517
+     * @since 9.0.0
518
+     */
519
+    public function getShareManager();
520
+
521
+    /**
522
+     * @return IContentSecurityPolicyManager
523
+     * @since 9.0.0
524
+     */
525
+    public function getContentSecurityPolicyManager();
526
+
527
+    /**
528
+     * @return \OCP\IDateTimeZone
529
+     * @since 8.0.0
530
+     */
531
+    public function getDateTimeZone();
532
+
533
+    /**
534
+     * @return \OCP\IDateTimeFormatter
535
+     * @since 8.0.0
536
+     */
537
+    public function getDateTimeFormatter();
538
+
539
+    /**
540
+     * @return \OCP\Federation\ICloudIdManager
541
+     * @since 12.0.0
542
+     */
543
+    public function getCloudIdManager();
544
+
545
+    /**
546
+     * @return \OCP\Remote\Api\IApiFactory
547
+     * @since 13.0.0
548
+     */
549
+    public function getRemoteApiFactory();
550
+
551
+    /**
552
+     * @return \OCP\Remote\IInstanceFactory
553
+     * @since 13.0.0
554
+     */
555
+    public function getRemoteInstanceFactory();
556 556
 }
Please login to merge, or discard this patch.