Guest User

Untitled

a guest
Oct 9th, 2020
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.1.0.1
  8. * @ Author : DeZender
  9. * @ Release on : 29.08.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. namespace Idus\Core\Plugin;
  15.  
  16. class Http extends \Magento\Framework\App\Response\Http
  17. {
  18. public function idus()
  19. {
  20. if (!isset($this->{__FUNCTION__})) {
  21. $this->idus = \Magento\Framework\App\ObjectManager::getInstance()->get('Idus\\Core\\Helper\\Data');
  22. }
  23.  
  24. return $this->idus;
  25. }
  26.  
  27. public function send()
  28. {
  29. $this->skipCache();
  30.  
  31. if (!isset($this->skipCache)) {
  32. header_remove('Set-Cookie');
  33. }
  34.  
  35. return parent::send();
  36. }
  37.  
  38. public function skipCache($ttl = 86400, $visible = 'public')
  39. {
  40. if (isset($this->{__FUNCTION__})) {
  41. return NULL;
  42. }
  43.  
  44. $this->_session = \Magento\Framework\App\ObjectManager::getInstance()->get('Magento\\Backend\\Model\\Auth\\Session');
  45.  
  46. if ($this->_session->isLoggedIn()) {
  47. $skip = true;
  48. }
  49. else {
  50. $skip = $this->request->getParam('_', false);
  51. }
  52. if (!$skip && !($skip = (int) $this->request->getParam('nocache', false))) {
  53. ....................................................................
  54. ..............................................
  55. .......................
Add Comment
Please, Sign In to add comment