Remote.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. * Page asset residing outside of the local file system
  9. */
  10. class Remote implements AssetInterface
  11. {
  12. /**
  13. * URL
  14. *
  15. * @var string
  16. */
  17. protected $url;
  18. /**
  19. * Content type
  20. *
  21. * @var string
  22. */
  23. protected $contentType;
  24. /**
  25. * Constructor
  26. *
  27. * @param string $url
  28. * @param string $contentType
  29. */
  30. public function __construct($url, $contentType = 'unknown')
  31. {
  32. $this->url = $url;
  33. $this->contentType = $contentType;
  34. }
  35. /**
  36. * {@inheritdoc}
  37. */
  38. public function getUrl()
  39. {
  40. return $this->url;
  41. }
  42. /**
  43. * {@inheritdoc}
  44. */
  45. public function getContentType()
  46. {
  47. return $this->contentType;
  48. }
  49. /**
  50. * {@inheritdoc}
  51. */
  52. public function getSourceContentType()
  53. {
  54. return $this->getContentType();
  55. }
  56. }