EnvironmentHelper.php 733 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  6. * SPDX-License-Identifier: AGPL-3.0-only
  7. */
  8. namespace OC\IntegrityCheck\Helpers;
  9. /**
  10. * Class EnvironmentHelper provides a non-static helper for access to static
  11. * variables such as \OC::$SERVERROOT.
  12. *
  13. * @package OC\IntegrityCheck\Helpers
  14. */
  15. class EnvironmentHelper {
  16. /**
  17. * Provides \OC::$SERVERROOT
  18. *
  19. * @return string
  20. */
  21. public function getServerRoot(): string {
  22. return rtrim(\OC::$SERVERROOT, '/');
  23. }
  24. /**
  25. * Provides \OC_Util::getChannel()
  26. *
  27. * @return string
  28. */
  29. public function getChannel(): string {
  30. return \OC_Util::getChannel();
  31. }
  32. }