コード例 #1
0
 /**
  * Resets the Kettenrad state, wipping out any pending backups and/or stale
  * temporary data.
  * @param array $config Configuration parameters for the reset operation
  */
 public static function reset($config = array())
 {
     $default_config = array('log' => false, 'maxrun' => 0);
     $config = (object) array_merge($default_config, $config);
     // Pause logging if so desired
     AliceUtilLogger::WriteLog(_AE_LOG_INFO, 'Resetting Kettenrad instance');
     if (!$config->log) {
         AliceUtilLogger::WriteLog(false, '');
     }
     // Cache the factory before proceeding
     $factory = AliceFactory::serialize();
     // @todo Here should happen all reset logic when we start another analysis
     // Reload the factory
     AliceFactory::unserialize($factory);
     unset($factory);
     // Unpause logging if it was previously paused
     if (!$config->log) {
         AliceUtilLogger::WriteLog(true, '');
     }
     AliceUtilLogger::WriteLog(_AE_LOG_INFO, 'Done resetting Kettenrad instance');
 }