FrontNameResolverInterface.php 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Application area front name resolver
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Framework\App\Area;
  9. /**
  10. * Every application request is executed in area context (@see \Magento\Framework\App\Area).
  11. * Area for request is defined by the first request path segment (admin for adminhtml area,
  12. * api for api area, none for frontend area). The request path segment that defines the area is called Area Front Name.
  13. *
  14. * For some areas Area Front Names are dynamic (can be configured by the user), so can not be referenced in code base.
  15. * This interface represents Front Name Resolvers that are called to retrieve front names
  16. * for areas with dynamic front names.
  17. *
  18. * @api
  19. * @since 100.0.2
  20. */
  21. interface FrontNameResolverInterface
  22. {
  23. /**
  24. * Retrieve front name
  25. *
  26. * @param bool $checkHost if true, return front name only if it is valid for the current host
  27. * @return string|bool
  28. */
  29. public function getFrontName($checkHost = false);
  30. }