ModuleListInterface.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * List of active application modules.
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Framework\Module;
  9. /**
  10. * Interface \Magento\Framework\Module\ModuleListInterface
  11. *
  12. */
  13. interface ModuleListInterface
  14. {
  15. /**
  16. * Get list of all modules
  17. *
  18. * Returns an array where key is module name and value is an array with module meta-information
  19. *
  20. * @return array
  21. */
  22. public function getAll();
  23. /**
  24. * Get module declaration data
  25. *
  26. * Returns an array with meta-information about one module by specified name
  27. *
  28. * @param string $name
  29. * @return array|null
  30. */
  31. public function getOne($name);
  32. /**
  33. * Enumerates the list of names of modules
  34. *
  35. * @return string[]
  36. */
  37. public function getNames();
  38. /**
  39. * Checks whether the specified module is present in the list
  40. *
  41. * @param string $name
  42. * @return bool
  43. */
  44. public function has($name);
  45. }