OXID eShop CE  4.9.7
 All Classes Files Functions Variables Pages
oxonlinerequest.php
Go to the documentation of this file.
1 <?php
2 
12 {
13 
19  public $clusterId;
20 
26  public $edition;
27 
33  public $version;
34 
38  public $shopUrl;
39 
45  public $pVersion;
46 
52  public $productId = 'eShop';
53 
57  public function __construct()
58  {
59  $oConfig = oxRegistry::getConfig();
60  $this->clusterId = $this->_getClusterId();
61  $this->edition = $oConfig->getEdition();
62  $this->version = $oConfig->getVersion();
63  $this->shopUrl = $oConfig->getShopUrl();
64  }
65 
72  private function _getClusterId()
73  {
74  $oConfig = oxRegistry::getConfig();
75  $sBaseShop = $oConfig->getBaseShopId();
76  $sClusterId = $oConfig->getShopConfVar('sClusterId', $sBaseShop);
77  if (!$sClusterId) {
78  $oUUIDGenerator = oxNew('oxUniversallyUniqueIdGenerator');
79  $sClusterId = $oUUIDGenerator->generate();
80  $oConfig->saveShopConfVar("str", 'sClusterId', $sClusterId, $sBaseShop);
81  }
82 
83  return $sClusterId;
84  }
85 }