Process all the captured tables

@return void
975582
protected function processTables()
	{
		foreach ($this->tables as $table)
		{
			$this->table = $table;
			$this->processCurrentTable();
		}
	}
330020
public function process()
    {
        for ($i = $this->io->inReadQueue(); $i > 0; $i--) {
            $this->eventsProducer->parseLine($this->io->pop());
        }
    }
30926
protected function load()
    {
        $tables = $this->fetchTables($this->schema);
        foreach ($tables as $table) {
            $this->loadTable($table);
        }
        $views = $this->fetchViews($this->schema);
        foreach ($views as $table) {
            $this->loadTable($table, true);
        }
    }
62763
public function process()
    {
        // Migrate init - to create migration table
        $name = $this->argument('name');

        if (!is_null($name)) {
            if (string_has($name, ',')) {
                $this->seeder()->executeOnly($name);
            } else {
                $this->seeder()->executeOnly($name);
            }
        }

        $this->seeder()->run();

        $this->info('Seeding Completed Successfully!');
    }
370517
protected function process()
    {

        // query whether or not, we've found a new path => means we've found a new category
        if ($this->hasBeenProcessed($path = $this->getValue(ColumnKeys::PATH))) {
            return;
        }

        // process the parent instance
        parent::process();

        // remove the path => row ID mapping from the subject
        $this->removePathRowIdMapping($path);
    }
1319994
public function process()
	{
		$view = $this->getView();
		$context = $this->getContext();
		$ids = (array) $view->param( 'wat_id', [] );

		try
		{
			if( $context->getUserId() != null && !empty( $ids ) )
			{
				switch( $view->param( 'wat_action' ) )
				{
					case 'add':
						$this->addItems( $view, $ids ); break;
					case 'edit':
						$this->editItems( $view, $ids ); break;
					case 'delete':
						$this->deleteItems( $view, $ids ); break;
				}
			}

			parent::process();
		}
		catch( \Aimeos\MShop\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
			$view->watchErrorList = $view->get( 'watchErrorList', [] ) + $error;
		}
		catch( \Aimeos\Controller\Frontend\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
			$view->watchErrorList = $view->get( 'watchErrorList', [] ) + $error;
		}
		catch( \Aimeos\Client\Html\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
			$view->watchErrorList = $view->get( 'watchErrorList', [] ) + $error;
		}
		catch( \Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
			$view->watchErrorList = $view->get( 'watchErrorList', [] ) + $error;
			$this->logException( $e );
		}
	}
598808
protected function process()
    {

        // process the link type attributes
        $productLinkAttribute = $this->getProductLinkAttributeByLinkTypeCodeAndAttributeCode($this->getValue(ColumnKeys::LINK_TYPE_CODE), $this->getValue(ColumnKeys::LINK_TYPE_ATTRIBUTE_CODE));

        // try to load the product link attribute
        $this->setProductLinkAttributeId($productLinkAttribute[MemberNames::PRODUCT_LINK_ATTRIBUTE_ID]);

        // load the link attribute data type
        $dataType = $productLinkAttribute[MemberNames::DATA_TYPE];

        // concatenate the initialize/persist method names
        $intializeMethod = sprintf('initializeProductLinkAttribute%s', $dataType);
        $persistMethod = sprintf('persistProductLinkAttribute%s', $dataType);

        // prepare, initialize and persist the product link attribute int entity
        $this->$persistMethod($this->$intializeMethod($this->prepareAttributes()));
    }
1327371
protected function captureTables()
	{
		unset($this->table);
		$this->tables = [];

		$this->pos = 0;
		foreach (explode("\n", $this->text) as $line)
		{
			if (strpos($line, '|') === false)
			{
				$this->endTable();
			}
			else
			{
				$this->addLine($line);
			}
			$this->pos += 1 + strlen($line);
		}
		$this->endTable();
	}
330389
public function process()
    {
        try {
            $this->processAlias();
            $this->processRoute();
            $this->output404();
        } catch (Exception $ex) {
            trigger_error($ex->getMessage());
            $this->response->outputError500();
        }
    }
1320454
public function process() {
		$result = [
			'success' => false,
			'error' => [],
			'count' => 0,
			'legend' => [],
		];
		if (empty($this->data)) {
			Throw new \Exception('You must specify "data" parameter.');
		}
		// if we have fixes to the data
		if (method_exists($this, 'overrides')) {
			$this->overrides();
		}
		// enable gc
		gc_enable();
		// processing one by one
		foreach (array_keys($this->data) as $k) {
			// we continue if we have no rows
			if (count($this->data[$k]['data']) == 0) continue;
			// object
			$model = $this->data[$k]['options']['model'];
			// we exit if primary model does not exists
			$object = new $model();
			$db_object = null;
			$collection_object = null;
			$flag_collection = false;
			// regular model
			$primary_model_name = null;
			$primary_model_object = null;
			if (is_a($object, '\Object\Table')) {
				if (!$object->dbPresent()) continue;
				$db_object = $object->db_object;
				// collection options
				$collection_options = [];
				if (!empty($this->data[$k]['options']['pk'])) {
					$collection_options['pk'] = $this->data[$k]['options']['pk'];
				}
				$collection_options['skip_acl'] = true;
				$collection_object = $model::collectionStatic($collection_options);
			} else if (is_a($object, '\Object\Collection')) { // collections
				if (!$object->primary_model->dbPresent()) continue;
				$collection_object = new $model(['skip_acl' => true]);
				$db_object = $collection_object->primary_model->db_object;
				$flag_collection = true;
			}
			unset($object);
			// start transaction
			if (!empty($db_object)) {
				$db_object->begin();
			}
			// counter & buffer
			$counter = 0;
			$buffer = [];
			do {
				// grab first element from the array
				$v2 = array_shift($this->data[$k]['data']);
				// we need to process overrides
				foreach ($v2 as $k3 => $v3) {
					// if we have a detail
					if (is_array($v3)) {
						foreach ($v3 as $k4 => $v4) {
							foreach ($v4 as $k5 => $v5) {
								if (is_array($v5)) {
									foreach ($v5 as $k6 => $v6) {
										foreach ($v6 as $k7 => $v7) {
											if (strpos($v7, '::id::') === 0) {
												$temp = $this->findAliasedValue($k7, $v7);
												if ($temp !== false) $v2[$k3][$k4][$k5][$k6][$k7] = $temp;
											}
										}
									}
								} else {
									if (!is_string($v5)) continue;
									if (is_numeric($k5)) continue;
									// if we need id
									if (strpos($v5, '::id::') === 0) {
										$temp = $this->findAliasedValue($k5, $v5);
										if ($temp !== false) $v2[$k3][$k4][$k5] = $temp;
									}
								}
							}
						}
					} else if (is_string($v3)) {
						// primary model
						if (strpos($v3, '::primary_model::') === 0) {
							$primary_model_name = str_replace('::primary_model::', '', $v3);
							$primary_model_object = new $primary_model_name();
							$v3 = '::id::' . $primary_model_name;
						}
						// if we need id
						if (strpos($v3, '::id::') === 0) {
							$temp = $this->findAliasedValue($k3, $v3);
							if ($temp !== false) $v2[$k3] = $temp;
							continue;
						}
						// from columns
						if (strpos($v3, '::from::') === 0) {
							$v3 = explode('::', str_replace('::from::', '', $v3));
							$first_type = trim(array_shift($v3));
							$temp = $primary_model_object->{$first_type};
							end($v3);
							$last_type = $v3[key($v3)];
							$v3 = array_key_get($temp, $v3);
							// some overrides
							if ($first_type == 'columns') {
								if ($last_type == 'domain') {
									$v3 = \Object\Data\Domains::getNonSequenceDomain($v3);
								}
								if ($last_type == 'type') {
									$v3 = \Object\Data\Types::getNonSequenceType($v3);
								}
							}
							$v2[$k3] = $v3;
							continue;
						}
					}
				}
				// we need to fix primary keys for details
				if ($flag_collection && !empty($collection_object->data['details'])) {
					foreach ($collection_object->data['details'] as $k25 => $v25) {
						if (empty($v2[$k25])) continue;
						if ($v25['type'] != '1M') continue;
						$temp_key = [];
						foreach ($v25['map'] as $k26 => $v26) {
							$temp_key[$v26] = $v2[$k26];
						}
						foreach ($v2[$k25] as $k27 => $v27) {
							$temp_key2 = [];
							foreach ($v25['pk'] as $v26) {
								$temp_key2[] = $temp_key[$v26] ?? $v27[$v26] ?? null;
							}
							$temp_key2 = implode('::', $temp_key2);
							unset($v2[$k25][$k27]);
							$v2[$k25][$temp_key2] = $v27;
						}
					}
				}
				// add value to buffer
				$buffer[] = $v2;
				// if buffer has 250 rows or we have no data
				if (count($buffer) > 249 || (count($buffer) > 0 && count($this->data[$k]['data']) == 0)) {
					// merge
					$result_insert = $collection_object->mergeMultiple($buffer, [
						'skip_optimistic_lock' => true
					]);
					if (!$result_insert['success']) {
						$result['error'] = $result_insert['error'];
						return $result;
					}
					// # of records and number of changes
					$counter+= $result_insert['count'];
					$buffer = [];
					// free up memory
					gc_collect_cycles();
				}
			} while (count($this->data[$k]['data']) > 0);
			// commit transaction
			if (!empty($db_object)) {
				$db_object->commit();
			}
			// legend
			$result['legend'][] = '         * Process ' . $k . ' changes ' . $counter;
			$result['count']+= $counter;
		}
		if (!empty($result['count'])) {
			array_unshift($result['legend'], '       * import');
		}
		$result['success'] = true;
		return $result;
	}
226645
protected function process()
    {
        $this->clearAllCaches();
        $this->purgeVisitedNodes();

        $xPath = new \DOMXPath($this->domDocument);
        $this->removeUnprocessableTags();
        $this->normalizeStyleAttributesOfAllNodes($xPath);

        // grab any existing style blocks from the html and append them to the existing CSS
        // (these blocks should be appended so as to have precedence over conflicting styles in the existing CSS)
        $allCss = $this->css;
        if ($this->isStyleBlocksParsingEnabled) {
            $allCss .= $this->getCssFromAllStyleNodes($xPath);
        }

        $excludedNodes = $this->getNodesToExclude($xPath);
        $cssRules = $this->parseCssRules($allCss);
        foreach ($cssRules['inlineable'] as $cssRule) {
            try {
                $nodesMatchingCssSelectors = $xPath->query($this->cssSelectorConverter->toXPath($cssRule['selector']));
            } catch (SyntaxErrorException $e) {
                if ($this->debug) {
                    throw $e;
                }
                continue;
            }

            /** @var \DOMElement $node */
            foreach ($nodesMatchingCssSelectors as $node) {
                if (\in_array($node, $excludedNodes, true)) {
                    continue;
                }
                $this->copyInlineableCssToStyleAttribute($node, $cssRule);
            }
        }

        if ($this->isInlineStyleAttributesParsingEnabled) {
            $this->fillStyleAttributesWithMergedStyles();
        }
        $this->postProcess($xPath);

        $this->removeImportantAnnotationFromAllInlineStyles($xPath);

        $this->copyUninlineableCssToStyleNode($xPath, $cssRules['uninlineable']);
    }
1208849
protected function process()
    {

        // query whether or not, we've found a new SKU => means we've found a new product
        if ($this->hasBeenProcessed($this->getValue(ColumnKeys::SKU))) {
            return;
        }

        // query whether or not, product => website relations has been specified
        if (!$this->hasValue(ColumnKeys::PRODUCT_WEBSITES)) {
            return;
        }

        // append the product => website relations found
        $codes = $this->getValue(ColumnKeys::PRODUCT_WEBSITES, array(), array($this, 'explode'));
        foreach ($codes as $code) {
            // set the code of the website that has to be processed
            $this->setCode($code);
            // prepare the product website relation attributes
            $attr = $this->prepareAttributes();

            try {
                // create the product website relation
                $productWebsite = $this->initializeProductWebsite($attr);
                $this->persistProductWebsite($productWebsite);
            } catch (\RuntimeException $re) {
                $this->getSystemLogger()->debug($re->getMessage());
            }
        }
    }
1234482
public function process()
    {
        switch ($this->inputs['action']) {
            case 'login':
                $this->webLogin();
                break;
            case 'logout':
                $this->webLogout();
                exit($this->showWebLoginForm());
                break;
            case 'getContacts':
                $this->getContacts();
                break;
            case 'updateStatus':
                $this->updateStatus();
                break;
            case 'sendMessage':
                $this->sendMessage();
                break;
            case 'sendBroadcast':
                $this->sendBroadcast();
                break;
            default:
                if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == true) {
                    exit($this->showWebForm());
                }
                exit($this->showWebLoginForm());
                break;
        }
    }
366726
protected function process()
    {

        // explode the path into the category names
        if ($categories = $this->explode($this->getValue(ColumnKeys::PATH), '/')) {
            // initialize the artefacts and reset the category IDs
            $artefacts = array();
            $this->categoryIds = array(1);

            // iterate over the category names and try to load the category therefore
            for ($i = 0; $i < sizeof($categories); $i++) {
                try {
                    // prepare the expected category name
                    $categoryPath = implode('/', array_slice($categories, 0, $i + 1));
                    // load the existing category
                    $category = $this->loadCategory($this->mapPath($categoryPath));
                    // prepend the ID the array with the category IDs
                    array_push($this->categoryIds, (integer) $category[MemberNames::ENTITY_ID]);
                } catch (\Exception $e) {
                    // log a message that requested category is NOT available
                    $this->getSystemLogger()->debug(sprintf('Can\'t load category %s, create a new one', $categoryPath));

                    // prepare the static entity values, insert the entity and set the entity ID
                    $category = $this->initializeCategory($this->prepareAttributes());

                    // update the persisted category with the entity ID
                    $category[$this->getPkMemberName()] = $this->persistCategory($category);
                    $category[MemberNames::URL_KEY] = $this->getValue(ColumnKeys::URL_KEY);

                    // append the ID of the new category to array with the IDs
                    array_push($this->categoryIds, $category[MemberNames::ENTITY_ID]);
                }
            }

            // temporary persist primary keys
            $this->updatePrimaryKeys($category);

            // prepare the artefact
            $artefact = array(
                $this->getPkMemberName() => $category[$this->getPkMemberName()],
                MemberNames::PATH        => implode('/', $this->categoryIds)
            );

            // put the artefact on the stack
            $artefacts[] = $artefact;

            // add the artefacts
            $this->addArtefacts($artefacts);
        }
    }
155666
protected function process()
    {

        // query whether or not we've the flag to upload the image files has been set
        if ($this->getSubject()->getConfiguration()->hasParam(ConfigurationKeys::COPY_IMAGES)) {
            // query whether or not we've to upload the image files
            if ($this->getSubject()->getConfiguration()->getParam(ConfigurationKeys::COPY_IMAGES)) {
                // initialize the array for the actual images
                $actualImageNames = array();

                // iterate over the available image fields
                foreach (array_keys($this->getImageTypes()) as $imageColumnName) {
                    // do nothing if the column is empty
                    if (!$this->hasValue($imageColumnName)) {
                        continue;
                    }

                    // override the image path with the new one, if the image has already been processed
                    if (isset($actualImageNames[$imageName = $this->getValue($imageColumnName)])) {
                        $this->setValue($imageColumnName, $actualImageNames[$imageName]);
                        continue;
                    }

                    // upload the file and set the new image path
                    $imagePath = $this->getSubject()->uploadFile($imageName);

                    // log a message that the image has been copied
                    $this->getSubject()
                         ->getSystemLogger()
                         ->debug(
                             sprintf(
                                 'Successfully copied image type %s with name %s => %s',
                                 $imageColumnName,
                                 $imageName,
                                 $imagePath
                             )
                         );

                    // override the image path with the new one
                    $this->setValue($imageColumnName, $imagePath);

                        // add the image to the list with processed images
                    $actualImageNames[$imageName] = $imagePath;
                }

                // query whether or not, we've additional images
                if ($additionalImages = $this->getValue(ColumnKeys::ADDITIONAL_IMAGES, null, array($this, 'explode'))) {
                    // process all the additional images
                    foreach ($additionalImages as $key => $additionalImageName) {
                        // query whether or not the image has already been processed
                        if (isset($actualImageNames[$additionalImageName])) {
                            // if yes, override the image path
                            $additionalImages[$key] = $imagePath;
                            // and override the image path with the new one
                            $this->setValue($imageColumnName, $actualImageNames[$additionalImageName]);
                            continue;
                        }

                        // upload the file and set the new image path
                        $imagePath = $this->getSubject()->uploadFile($additionalImageName);

                        // log a message that the image has been copied
                        $this->getSubject()
                             ->getSystemLogger()
                             ->debug(
                                 sprintf(
                                     'Successfully copied additional image wth name %s => %s',
                                     $additionalImageName,
                                     $imagePath
                                 )
                             );

                        // override the image path
                        $additionalImages[$key] = $imagePath;

                        // add the image to the list with processed images
                        $actualImageNames[$additionalImageName] = $imagePath;
                    }

                    // override the image paths with the new one
                    $this->setValue(ColumnKeys::ADDITIONAL_IMAGES, implode(',', $additionalImages));
                }
            }
        }
    }
1272935
protected function process()
    {

        // query whether or not, we've found a new SKU => means we've found a new product
        if ($this->isLastSku($sku = $this->getValue(ColumnKeys::SKU))) {
            return;
        }

        // elete the URL rewrites of the product with the passed SKU
        $this->deleteUrlRewrite(array(ColumnKeys::SKU => $sku), SqlStatementKeys::DELETE_URL_REWRITE_BY_SKU);
    }
1294146
protected function process()
    {

        // add the path => entity ID/store view code mapping
        $this->addPathEntityIdMapping($path = $this->getValue(ColumnKeys::PATH));
        $this->addPathStoreViewCodeMapping($path, $this->getSubject()->getStoreViewCode(StoreViewCodes::ADMIN));

        // temporary persist the path
        $this->setLastPath($path);
    }