Advertisement
Guest User

Untitled

a guest
Jul 16th, 2020
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 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.0
  8. * @ Author : DeZender
  9. * @ Release on : 15.05.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. namespace SupportPal\Licensing;
  15.  
  16. class Client
  17. {
  18. const CACHE_LICENSE_INFO = 'license_information';
  19. const CACHE_PRODUCT_INFO = 'license_product';
  20. const SALT_LENGTH = 10;
  21.  
  22. /**
  23. * The current HTTP request
  24. *
  25. * @var Request
  26. */
  27. private $request;
  28. /**
  29. * The server IP
  30. *
  31. * @var string
  32. */
  33. private $serverIp;
  34. /**
  35. * Log of actions performed whilst checking a license
  36. *
  37. * @var array
  38. */
  39. protected $logProgress = [];
  40. /**
  41. * License code
  42. *
  43. * @var string
  44. */
  45. private $license;
  46. /**
  47. * Total number of active brands.
  48. *
  49. * @var int
  50. */
  51. private $activeBrands;
  52. /**
  53. * Array of license information from the database
  54. *
  55. * @var array
  56. */
  57. private $licenseArray = [];
  58. /**
  59. * API instance.
  60. *
  61. * @var Api
  62. */
  63. private $api;
  64. /**
  65. * Version instance.
  66. *
  67. * @var Version
  68. */
  69. private $version;
  70. /**
  71. * Event dispatcher instance.
  72. *
  73. * @var Dispatcher
  74. */
  75. private $dispatcher;
  76.  
  77. /**
  78. * Initialise the client
  79. *
  80. * @param Request $request
  81. * @param Api $api
  82. * @param Version $version
  83. * @param Dispatcher $dispatcher
  84. */
  85. public function __construct(\Illuminate\Http\Request $request, Api $api, Version $version, \Illuminate\Contracts\Events\Dispatcher $dispatcher)
  86. {
  87. $this->api = $api;
  88. $this->version = $version;
  89. $this->request = $request;
  90. $this->dispatcher = $dispatcher;
  91. $this->serverIp = IpUtils::getServerIP();
  92. }
  93.  
  94. /**
  95. * Get license code.
  96. *
  97. * @return string
  98. */
  99. public function getLicenseCode()
  100. {
  101. if (!empty($this->license)) {
  102. return $this->license;
  103. }
  104.  
  105. return Models\License::get(Models\License::CODE_SETTING_NAME);
  106. ..............................................................
  107. .................................
  108. ...........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement