/**
  * Returns the configuration
  *
  * @param integer $id
  *
  * @return array
  */
 public function getConfiguration($id)
 {
     if (!isset($this->configurationArray[$id])) {
         $modTsConfig = t3lib_BEfunc::getModTSconfig($id, 'mod.vcc');
         $this->configurationArray[$id] = $modTsConfig['properties'];
         // Log debug information
         $logData = array('id' => $id, 'configuration' => $modTsConfig['properties']);
         $this->loggingService->debug('TsConfigService::getConfiguration id: ' . $id, $logData);
     }
     return $this->configurationArray[$id];
 }
 /**
  * Send clear cache commands for pages to defined server
  *
  * @param string $table
  * @param integer $id
  * @param string $host
  * @param boolean $quote
  *
  * @return array
  */
 public function sendClearCacheCommandForTables($table, $uid, $host = '', $quote = TRUE)
 {
     // Get current record to process
     $record = t3lib_BEfunc::getRecord($table, $uid);
     // Build request
     if ($table === 'pages') {
         $pid = $record['uid'];
     } else {
         $pid = $record['pid'];
     }
     // Log debug information
     $logData = array('table' => $table, 'uid' => $uid, 'host' => $host, 'pid' => $pid);
     $this->loggingService->debug('CommunicationService::sendClearCacheCommandForTables arguments', $logData, $pid);
     $tsConfig = $this->tsConfigService->getConfiguration($pid);
     $typolink = $tsConfig[$table . '.']['typolink.'];
     $this->contentObject->data = $record;
     $url = $this->contentObject->typoLink_URL($typolink);
     $LD = $this->contentObject->lastTypoLinkLD;
     // Check for root site
     if ($url === '' && $table === 'pages') {
         $rootline = t3lib_BEfunc::BEgetRootLine($uid);
         if (is_array($rootline) && count($rootline) > 1) {
             // If uid equals the site root we have to process
             if ($uid == $rootline[1]['uid']) {
                 $url = '/';
             }
         }
     }
     // Log debug information
     $logData['url'] = $url;
     $this->loggingService->debug('CommunicationService::sendClearCacheCommandForTables built url', $logData, $pid);
     // Process only for valid URLs
     if ($url !== '') {
         $url = $this->removeHost($url);
         $responseArray = $this->processClearCacheCommand($url, $pid, $host, $quote);
         // Check support of index.php script
         if ($this->enableIndexScript) {
             $url = $LD['url'] . $LD['linkVars'];
             $url = $this->removeHost($url);
             $indexResponseArray = $this->processClearCacheCommand($url, $pid, $host, $quote);
             $responseArray = array_merge($responseArray, $indexResponseArray);
         }
         return $responseArray;
     }
     return array(array('status' => t3lib_FlashMessage::ERROR, 'message' => array('No valid URL was generated.', 'table: ' . $table, 'uid: ' . $uid, 'host: ' . $host), 'requestHeader' => array($url)));
 }