Clean up the global data after importing the bunch.

@param string $serial The serial of the actual import

@return void
975923
public function tearDown($serial)
    {

        // load the registry processor
        $registryProcessor = $this->getRegistryProcessor();

        // update the status
        $registryProcessor->mergeAttributesRecursive(
            $serial,
            array(
                RegistryKeys::CUSTOMER_IDENTIFIER_ENTITY_ID_MAPPING => $this->customerIdentifierEntityIdMapping,
            )
        );

        // invoke the parent method
        parent::tearDown($serial);
    }
1120588
public function unserialize($serialized)
    {
        list(
            $this->gdImageData,
            $this->pts,
            $this->width,
            $this->height
        ) = unserialize($serialized);
    }
1311765
public function clearAllData()
    {
        if (!$this->isUsed()) {
            return;
        }

        $this->getConn()->clearAllData();

        // Some DataExtensions keep a static cache of information that needs to
        // be reset whenever the database is cleaned out
        $classes = array_merge(
            ClassInfo::subclassesFor(DataExtension::class),
            ClassInfo::subclassesFor(DataObject::class)
        );
        foreach ($classes as $class) {
            $toCall = array($class, 'on_db_reset');
            if (is_callable($toCall)) {
                call_user_func($toCall);
            }
        }
    }
492650
public function unserialize($serialized)
    {
        list(
            $this->outFilePath,
            $this->width,
            $this->height,
            $this->frameRate,
            $this->loopCount,
            $this->gifData,
            $this->frames,
            $this->counter
        ) = unserialize($serialized);
    }
1233445
public function cleanUp()
    {
        $this->status = self::STATUS_CLEANINGUP;
        if ($this->process->isRunning()) {
            $this->sendTERMSignal();
        } else {
            $this->status = self::STATUS_CLEANEDUP;
        }

    }
545031
public function unserialize($serialized) {
            $s = unserialize($serialized);
            $this->defaults = $s[0];
            $this->custom = $s[1];
            $this->merge();
        }
109127
public function unserialize($serialized)
    {
        list(
            $this->name,
            $this->params,
            $this->stopPropagation
            ) = \unserialize($serialized, ['allowed_classes' => false]);
    }
663341
protected function cleanSerial($serial)
    {
        if ($serial instanceof \core_kernel_classes_Resource) {
            $serial = $serial->getUri();
        } elseif ($serial instanceof \core_kernel_classes_Literal) {
            $serial = $serial->__toString();
        } elseif (!is_string($serial)) {
            throw new FileSerializerException('Unsupported serial "'.gettype($serial).'" in '.__CLASS__);
        }

        return $serial;
    }
380964
public function clean() {
    $this->logger->info('%name started.', ['%name' => get_class($this)]);

    $dataToRemove = $this->wrapper->getDataToRemove();
    foreach ($dataToRemove as $locationId => $locationData) {
      foreach ($locationData as $classId) {
        $this->mappingRepo->removeByLocationIdAndClassId($locationId, $classId);
      }
    }

    $this->logger->info('%name finished.', ['%name' => get_class($this)]);
  }
133691
public function unserialize($serialized) {
        $data = msgpack_unpack($serialized);
        $this->check        = $data['check'];
        $this->base         = $data['base'];
        $this->index        = $data['index'];
        $this->fail_states  = $data['fail_states'];
        $this->index_count  = $data['index_count'];
        $this->index_code   = $data['index_code'];
        $this->tmp_tree     = $data['tmp_tree'];
        $this->word_states  = $data['word_states'] ?? $data['words_states'];
        $this->begin_used   = $data['begin_used'];
    }
671864
public function unserialize($serialized)
    {
        $data = unserialize($serialized);
        $this->data = $data['data'];
        $this->setOriginalData($data['originalData']);
    }
1126565
protected function cleanData()
    {
        $this->data = array_except($this->data, [
            '_token',
            'save',
            'save_create',
            'save_return',
            $this->repository->getKeyName(),
        ]);

        // leave only fillable columns
        $this->data = array_only($this->data, $this->repository->getFillable());
    }
1303865
protected function clean()
	{
		unset($this->input);

		$this->index = 0;
		$this->a = $this->b = '';

		unset($this->c);
		unset($this->options);
	}
771845
private function sanitizeGlobals() {
		// It would be "wrong" to unset any of these GLOBALS.
		$protected = array('_SERVER', '_GET', '_POST', '_FILES', '_REQUEST', '_SESSION', '_ENV', 'GLOBALS', 'system_folder', 'application_folder', 'BM', 'EXT', 'CFG', 'URI', 'RTR', 'OUT', 'IN');
		
		// Unset globals for securiy.
		// This is effectively the same as register_globals = off
		foreach (array($_GET, $_POST, $_COOKIE) as $global) {
			if (!is_array($global)) {
				if (!in_array($global, $protected)) {
					global $$global;
					$$global = NULL;
				}
			} else {
				foreach ($global as $key => $val) {
					if (!in_array($key, $protected)) {
						global $$key;
						$$key = NULL;
					}
				}
			}
		}
		
		// Is $_GET data allowed? If not we'll set the $_GET to an empty array
		if (is_array($_GET) and count($_GET) > 0) {
			foreach ($_GET as $key => $val) {
				$_GET[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);
			}
		}
		
		// Clean $_POST Data
		if (is_array($_POST) and count($_POST) > 0) {
			foreach ($_POST as $key => $val) {
				$_POST[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);
			}
		}
		
		// Clean $_COOKIE Data
		if (is_array($_COOKIE) and count($_COOKIE) > 0) {
			// Also get rid of specially treated cookies that might be set by a
			// server
			// or silly application, that are of no use to a CI application
			// anyway
			// but that when present will trip our 'Disallowed Key Characters'
			// alarm
			// http://www.ietf.org/rfc/rfc2109.txt
			// note that the key names below are single quoted strings, and are
			// not PHP variables
			unset($_COOKIE['$Version']);
			unset($_COOKIE['$Path']);
			unset($_COOKIE['$Domain']);
			
			foreach ($_COOKIE as $key => $val) {
				$_COOKIE[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);
			}
		}
		
		// Sanitize PHP_SELF
		$_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']);
		
		// CSRF Protection check
		if ($this->_enable_csrf == TRUE) {
			Security::csrf_verify();
		}
		
	}
700598
public function unserialize($serialized)
    {
        $data          = unserialize($serialized);
        $this->results = [];

        /** @noinspection ForeachSourceInspection */
        foreach ($data['results'] as $item) {
            $this->results[] = $item;
        }

        /** @noinspection ForeachSourceInspection */
        foreach ($data['adapters'] as $item) {
            $this->adapters->insert($item['data'], $item['priority']);
        }
    }
54581
public function tearDown($serial)
    {

        // load the registry processor
        $registryProcessor = $this->getRegistryProcessor();

        // update the status
        $registryProcessor->mergeAttributesRecursive(
            $serial,
            array(
                RegistryKeys::SKU_ENTITY_ID_MAPPING => $this->skuEntityIdMapping,
                RegistryKeys::SKU_STORE_VIEW_CODE_MAPPING => $this->skuStoreViewCodeMapping
            )
        );

        // invoke the parent method
        parent::tearDown($serial);
    }
460003
public function clean()
    {
        $allchild = $this->getChildComponents(true);
        foreach ($allchild as $component) {
            
            if($component instanceof SubmitDataRequest) {
               $component->clean();
            }
         
 
        }
    }