oxonlinerequest.php

Go to the documentation of this file.
00001 <?php
00002 
00011 class oxOnlineRequest
00012 {
00013 
00019     public $clusterId;
00020 
00026     public $edition;
00027 
00033     public $version;
00034 
00038     public $shopUrl;
00039 
00045     public $pVersion;
00046 
00052     public $productId = 'eShop';
00053 
00057     public function __construct()
00058     {
00059         $oConfig = oxRegistry::getConfig();
00060         $this->clusterId = $this->_getClusterId();
00061         $this->edition = $oConfig->getEdition();
00062         $this->version = $oConfig->getVersion();
00063         $this->shopUrl = $oConfig->getShopUrl();
00064     }
00065 
00072     private function _getClusterId()
00073     {
00074         $oConfig = oxRegistry::getConfig();
00075         $sBaseShop = $oConfig->getBaseShopId();
00076         $sClusterId = $oConfig->getShopConfVar('sClusterId', $sBaseShop);
00077         if (!$sClusterId) {
00078             $oUUIDGenerator = oxNew('oxUniversallyUniqueIdGenerator');
00079             $sClusterId = $oUUIDGenerator->generate();
00080             $oConfig->saveShopConfVar("str", 'sClusterId', $sClusterId, $sBaseShop);
00081         }
00082 
00083         return $sClusterId;
00084     }
00085 }