Data.php 1022 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /**
  7. * Page cache data helper
  8. *
  9. */
  10. namespace Magento\PageCache\Helper;
  11. /**
  12. * Helper for Page Cache module
  13. */
  14. class Data extends \Magento\Framework\App\Helper\AbstractHelper
  15. {
  16. /**
  17. * Private caching time one year
  18. */
  19. const PRIVATE_MAX_AGE_CACHE = 31536000;
  20. /**
  21. * @var \Magento\Framework\Session\Config
  22. */
  23. protected $config;
  24. /**
  25. * @param \Magento\Framework\Session\Config $config
  26. */
  27. public function __construct(\Magento\Framework\Session\Config $config)
  28. {
  29. $this->config;
  30. }
  31. /**
  32. * Retrieve url
  33. *
  34. * @param string $route
  35. * @param array $params
  36. * @return string
  37. */
  38. public function getUrl($route, array $params = [])
  39. {
  40. return $this->_getUrl($route, $params);
  41. }
  42. /**
  43. * @return string
  44. */
  45. public function getDomain()
  46. {
  47. return $this->config->getValidDomain();
  48. }
  49. }