Bundle.php 708 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OC\App\AppStore\Bundles;
  7. use OCP\IL10N;
  8. abstract class Bundle {
  9. /**
  10. * @param IL10N $l10n
  11. */
  12. public function __construct(
  13. protected IL10N $l10n,
  14. ) {
  15. }
  16. /**
  17. * Get the identifier of the bundle
  18. *
  19. * @return string
  20. */
  21. final public function getIdentifier() {
  22. return substr(strrchr(get_class($this), '\\'), 1);
  23. }
  24. /**
  25. * Get the name of the bundle
  26. *
  27. * @return string
  28. */
  29. abstract public function getName();
  30. /**
  31. * Get the list of app identifiers in the bundle
  32. *
  33. * @return array
  34. */
  35. abstract public function getAppIdentifiers();
  36. }