Example #1
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     // Init some vars
     $this->arrBackupTables = array();
     $this->strTimestampFormat = str_replace(array_keys($GLOBALS['SYC_CONFIG']['folder_file_replacement']), array_values($GLOBALS['SYC_CONFIG']['folder_file_replacement']), $GLOBALS['TL_CONFIG']['datimFormat']);
     $this->intMaxMemoryUsage = SyncCtoModuleClient::parseSize(ini_get('memory_limit'));
     $this->intMaxMemoryUsage = $this->intMaxMemoryUsage / 100 * 80;
     // Load hidden tables
     $this->arrHiddenTables = deserialize($GLOBALS['SYC_CONFIG']['table_hidden']);
     if (!is_array($this->arrHiddenTables)) {
         $this->arrHiddenTables = array();
     }
     // Load Helper
     $this->objSyncCtoHelper = SyncCtoHelper::getInstance();
     $this->Database = Database::getInstance();
 }
Example #2
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     // Init
     $this->objSyncCtoHelper = SyncCtoHelper::getInstance();
     $this->objFiles = \Files::getInstance();
     $this->strTimestampFormat = str_replace(array(':', ' '), array('', '_'), $GLOBALS['TL_CONFIG']['datimFormat']);
     // Load blacklists and whitelists
     $this->arrRootFolderList = $this->objSyncCtoHelper->getWhitelistFolder();
     // Get memory limit
     $this->intMaxMemoryUsage = SyncCtoModuleClient::parseSize(ini_get('memory_limit'));
     $this->intMaxMemoryUsage = $this->intMaxMemoryUsage / 100 * 30;
     // Get execution limit
     $this->intMaxExecutionTime = SyncCtoHelper::parseRuntime(ini_get('max_execution_time'));
     $this->intMaxExecutionTime = intval($this->intMaxExecutionTime / 100 * 25);
     // Flags for file scanning.
     $this->strRDIFlags = RecursiveDirectoryIterator::FOLLOW_SYMLINKS | RecursiveDirectoryIterator::SKIP_DOTS | RecursiveDirectoryIterator::UNIX_PATHS;
 }
Example #3
0
 /**
  * Replace the m/g/ etc. from php ini
  * 
  * @param mix $strValue
  * @return int
  */
 private function getSize($strValue)
 {
     return SyncCtoModuleClient::parseSize($strValue);
 }