LocalInterface.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\View\Asset;
  7. /**
  8. * Interface of an asset with locally accessible source file
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface LocalInterface extends AssetInterface
  13. {
  14. /**
  15. * Get original source file where the asset contents can be read from
  16. *
  17. * Returns absolute path to file in local file system
  18. *
  19. * @return string
  20. */
  21. public function getSourceFile();
  22. /**
  23. * Get content of a local asset
  24. *
  25. * @return string
  26. */
  27. public function getContent();
  28. /**
  29. * Get an invariant relative path to file
  30. *
  31. * @return string
  32. */
  33. public function getFilePath();
  34. /**
  35. * Get context of the asset that contains data necessary to build an absolute path or URL to the file
  36. *
  37. * @return ContextInterface
  38. */
  39. public function getContext();
  40. /**
  41. * Get the module context of file path
  42. *
  43. * @return string
  44. */
  45. public function getModule();
  46. /**
  47. * Get a relative "context" path to the asset file
  48. *
  49. * This path includes both invariant and context part that can serve as an identifier of the file in current context
  50. *
  51. * @return string
  52. */
  53. public function getPath();
  54. }