Processes all resources associated to the configured source objects for a proxy implementation

@throws \Msl\ResourceProxy\Exception\GlobalProcessException

@return void
422461
public function processResources()
    {
        // Fetching the sources iterator
        $errors = array();
        foreach($this->sourcesIterator as $source) {
            // Processing all resources associated to the current source object
            if ($source instanceof SourceInterface) {
                try {
                    $this->processResourcesBySource($source);
                } catch (Exception\PostParseException $e) {
                    array_push($errors, $e);
                } catch (Exception\ResourceProxyExceptionInterface $e) {
                    $msg = sprintf(
                        'General proxy error caught for the following source: \'%s\'. Error is: \'%s\'.',
                        $source->getName(),
                        $e->getMessage()
                    );
                    array_push($errors, $msg);
                } catch (\Exception $e) {
                    $msg = sprintf(
                        'General error caught for the following source: \'%s\'. Error is: \'%s\'.',
                        $source->getName(),
                        $e->getMessage()
                    );
                    array_push($errors, $msg);
                }
            }
        }

        // If errors, we throw a global process exception
        if (count($errors) > 0) {
            throw new Exception\GlobalProcessException(
                $errors,
                sprintf(
                    'Errors while processing the sources for the following proxy: \'%s\'.',
                    $this->getProxyName()
                )
            );
        }
    }
1032261
public function process()
    {
        // Run the UpdatePackageInfo task
        $updateTask = Injector::inst()->create(UpdatePackageInfoTask::class);
        $updateTask->run(null);

        // mark job as completed
        $this->isComplete = true;
    }
714154
public function process()
    {
        parent::process();

        $flydown = $this->getCompositeWidget('flydown');
        if ($flydown->value == '') {
            $this->value = null;
        } else {
            $this->value = (int) $flydown->value;
        }
    }
798649
private function processConnection()
	{
		$builder = $this->getContainerBuilder();

		$connection = $builder->addDefinition($this->prefix('connection'))
			->setClass(Connection::class)
			->setFactory(DriverManager::class . '::getConnection', [$this->config['connection']]);
	}
341597
protected function process()
    {

        // process the new URL rewrites first
        parent::process();

        // load the root category
        $rootCategory = $this->getRootCategory();

        // create redirect URL rewrites for the existing URL rewrites
        foreach ($this->existingUrlRewrites as $existingUrlRewrite) {
            // if the URL rewrite has been created manually
            if ((integer) $existingUrlRewrite[MemberNames::IS_AUTOGENERATED] === 0) {
                // do NOTHING, because someone really WANTED to create THIS redirect
                continue;
            }

            // query whether or not 301 redirects have to be created, so don't create redirects
            // if the product is NOT visible or the rewrite history has been deactivated
            if ($this->isVisible() && $this->getSubject()->getCoreConfigData(CoreConfigDataKeys::CATALOG_SEO_SAVE_REWRITES_HISTORY, true)) {
                // if the URL rewrite already IS a redirect
                if ((integer) $existingUrlRewrite[MemberNames::REDIRECT_TYPE] !== 0) {
                    // do NOT create another redirect or update the actual one
                    continue;
                }

                // initialize the data with the URL rewrites new 301 configuration
                $attr = array(MemberNames::REDIRECT_TYPE => 301);

                // initialize the category with the root category
                $category = $rootCategory;

                // load the metadata from the existing URL rewrite
                $metadata = $this->getMetadata($existingUrlRewrite);

                // query whether or not the URL key of the existing URL rewrite has changed
                if (is_array($metadata) && isset($metadata[UrlRewriteObserver::CATEGORY_ID])) {
                    if (isset($this->urlRewrites[$metadata[UrlRewriteObserver::CATEGORY_ID]])) {
                        try {
                            // if yes, try to load the original category and OVERRIDE the default category
                            $category = $this->getCategory($metadata[UrlRewriteObserver::CATEGORY_ID], $this->getValue(ColumnKeys::STORE_VIEW_CODE));
                        } catch (\Exception $e) {
                            // if the old category can NOT be loaded, remove the
                            // category ID from the URL rewrites metadata
                            $attr[MemberNames::METADATA] = null;

                            // finally log a warning that the old category is not available ony more
                            $this->getSubject()
                                 ->getSystemLogger()
                                 ->warning(
                                     sprintf(
                                         'Category with ID "%d" is not longer available for URL rewrite with ID "%d"',
                                         $metadata[UrlRewriteObserver::CATEGORY_ID],
                                         $existingUrlRewrite[MemberNames::URL_REWRITE_ID]
                                     )
                                 );
                        }
                    }
                }

                // load target path/metadata for the actual category
                $targetPath = $this->prepareRequestPath($category);

                // skip update of URL rewrite, if resulting new target path EQUALS old request path
                if ($targetPath === $existingUrlRewrite[MemberNames::REQUEST_PATH]) {
                    // finally log a warning that the old category is not available ony more
                    $this->getSubject()
                         ->getSystemLogger()
                         ->warning(
                             sprintf(
                                 'New target path "%s" eqals request path for URL rewrite with ID "%d"',
                                 $existingUrlRewrite[MemberNames::REQUEST_PATH],
                                 $existingUrlRewrite[MemberNames::URL_REWRITE_ID]
                             )
                         );

                    // stop processing the URL rewrite
                    continue;
                }

                // set the target path
                $attr[MemberNames::TARGET_PATH] = $targetPath;

                // merge and return the prepared URL rewrite
                $existingUrlRewrite = $this->mergeEntity($existingUrlRewrite, $attr);

                // create the URL rewrite
                $this->persistUrlRewrite($existingUrlRewrite);
            } else {
                // query whether or not the URL rewrite has to be removed
                if ($this->getSubject()->getConfiguration()->hasParam(ConfigurationKeys::CLEAN_UP_URL_REWRITES) &&
                    $this->getSubject()->getConfiguration()->getParam(ConfigurationKeys::CLEAN_UP_URL_REWRITES)
                ) {
                    // delete the existing URL rewrite
                    $this->deleteUrlRewrite($existingUrlRewrite);

                    // log a message, that old URL rewrites have been cleaned-up
                    $this->getSubject()
                         ->getSystemLogger()
                         ->warning(
                             sprintf(
                                 'Cleaned-up %d URL rewrite "%s" for product with SKU "%s"',
                                 $existingUrlRewrite[MemberNames::REQUEST_PATH],
                                 $this->getValue(ColumnKeys::SKU)
                             )
                         );
                }
            }
        }
    }
761607
private void processResources()
   {
      FastTrackTable table = m_data.getTable(FastTrackTableType.RESOURCES);
      for (MapRow row : table)
      {
         int uniqueID = row.getInt(ResourceField.RESOURCE_ID);
         if (uniqueID <= 0)
         {
            continue;
         }

         Resource resource = m_project.addResource();
         resource.setCode(row.getString(ResourceField.CODE));
         resource.setCostPerUse(row.getCurrency(ResourceField.PER_USE_COST));
         resource.setEmailAddress(row.getString(ResourceField.EMAIL_ADDRESS));
         resource.setFlag(1, row.getBoolean(ResourceField.FLAG_1));
         resource.setFlag(2, row.getBoolean(ResourceField.FLAG_2));
         resource.setFlag(3, row.getBoolean(ResourceField.FLAG_3));
         resource.setFlag(4, row.getBoolean(ResourceField.FLAG_4));
         resource.setFlag(5, row.getBoolean(ResourceField.FLAG_5));
         resource.setFlag(6, row.getBoolean(ResourceField.FLAG_6));
         resource.setFlag(7, row.getBoolean(ResourceField.FLAG_7));
         resource.setFlag(8, row.getBoolean(ResourceField.FLAG_8));
         resource.setFlag(9, row.getBoolean(ResourceField.FLAG_9));
         resource.setFlag(10, row.getBoolean(ResourceField.FLAG_10));
         resource.setFlag(11, row.getBoolean(ResourceField.FLAG_11));
         resource.setFlag(12, row.getBoolean(ResourceField.FLAG_12));
         resource.setFlag(13, row.getBoolean(ResourceField.FLAG_13));
         resource.setFlag(14, row.getBoolean(ResourceField.FLAG_14));
         resource.setFlag(15, row.getBoolean(ResourceField.FLAG_15));
         resource.setFlag(16, row.getBoolean(ResourceField.FLAG_16));
         resource.setFlag(17, row.getBoolean(ResourceField.FLAG_17));
         resource.setFlag(18, row.getBoolean(ResourceField.FLAG_18));
         resource.setFlag(19, row.getBoolean(ResourceField.FLAG_19));
         resource.setFlag(20, row.getBoolean(ResourceField.FLAG_20));
         resource.setGroup(row.getString(ResourceField.GROUP));
         resource.setGUID(row.getUUID(ResourceField._RESOURCE_GUID));
         resource.setInitials(row.getString(ResourceField.INITIALS));
         resource.setMaterialLabel(row.getString(ResourceField.MATERIAL_LABEL));
         resource.setName(row.getString(ResourceField.RESOURCE_NAME));
         resource.setNotes(row.getString(ResourceField.RESOURCE_NOTES));
         resource.setNumber(1, row.getDouble(ResourceField.NUMBER_1));
         resource.setNumber(2, row.getDouble(ResourceField.NUMBER_2));
         resource.setNumber(3, row.getDouble(ResourceField.NUMBER_3));
         resource.setNumber(4, row.getDouble(ResourceField.NUMBER_4));
         resource.setNumber(5, row.getDouble(ResourceField.NUMBER_5));
         resource.setNumber(6, row.getDouble(ResourceField.NUMBER_6));
         resource.setNumber(7, row.getDouble(ResourceField.NUMBER_7));
         resource.setNumber(8, row.getDouble(ResourceField.NUMBER_8));
         resource.setNumber(9, row.getDouble(ResourceField.NUMBER_9));
         resource.setNumber(10, row.getDouble(ResourceField.NUMBER_10));
         resource.setNumber(11, row.getDouble(ResourceField.NUMBER_11));
         resource.setNumber(12, row.getDouble(ResourceField.NUMBER_12));
         resource.setNumber(13, row.getDouble(ResourceField.NUMBER_13));
         resource.setNumber(14, row.getDouble(ResourceField.NUMBER_14));
         resource.setNumber(15, row.getDouble(ResourceField.NUMBER_15));
         resource.setNumber(16, row.getDouble(ResourceField.NUMBER_16));
         resource.setNumber(17, row.getDouble(ResourceField.NUMBER_17));
         resource.setNumber(18, row.getDouble(ResourceField.NUMBER_18));
         resource.setNumber(19, row.getDouble(ResourceField.NUMBER_19));
         resource.setNumber(20, row.getDouble(ResourceField.NUMBER_20));
         resource.setText(1, row.getString(ResourceField.TEXT_1));
         resource.setText(2, row.getString(ResourceField.TEXT_2));
         resource.setText(3, row.getString(ResourceField.TEXT_3));
         resource.setText(4, row.getString(ResourceField.TEXT_4));
         resource.setText(5, row.getString(ResourceField.TEXT_5));
         resource.setText(6, row.getString(ResourceField.TEXT_6));
         resource.setText(7, row.getString(ResourceField.TEXT_7));
         resource.setText(8, row.getString(ResourceField.TEXT_8));
         resource.setText(9, row.getString(ResourceField.TEXT_9));
         resource.setText(10, row.getString(ResourceField.TEXT_10));
         resource.setText(11, row.getString(ResourceField.TEXT_11));
         resource.setText(12, row.getString(ResourceField.TEXT_12));
         resource.setText(13, row.getString(ResourceField.TEXT_13));
         resource.setText(14, row.getString(ResourceField.TEXT_14));
         resource.setText(15, row.getString(ResourceField.TEXT_15));
         resource.setText(16, row.getString(ResourceField.TEXT_16));
         resource.setText(17, row.getString(ResourceField.TEXT_17));
         resource.setText(18, row.getString(ResourceField.TEXT_18));
         resource.setText(19, row.getString(ResourceField.TEXT_19));
         resource.setText(20, row.getString(ResourceField.TEXT_20));
         resource.setText(21, row.getString(ResourceField.TEXT_21));
         resource.setText(22, row.getString(ResourceField.TEXT_22));
         resource.setText(23, row.getString(ResourceField.TEXT_23));
         resource.setText(24, row.getString(ResourceField.TEXT_24));
         resource.setText(25, row.getString(ResourceField.TEXT_25));
         resource.setText(26, row.getString(ResourceField.TEXT_26));
         resource.setText(27, row.getString(ResourceField.TEXT_27));
         resource.setText(28, row.getString(ResourceField.TEXT_28));
         resource.setText(29, row.getString(ResourceField.TEXT_29));
         resource.setText(30, row.getString(ResourceField.TEXT_30));
         resource.setUniqueID(Integer.valueOf(uniqueID));
         m_eventManager.fireResourceReadEvent(resource);
      }
   }
677276
public function process()
    {
        parent::process();

        $cmd = $this->compile();
        $this->runCmd(
            $cmd,
            '\Thapp\JitImage\Exception\ImageProcessException',
            function ($stderr) {
                $this->clean();
            },
            ['#', PHP_EOL]
        );
    }
1169870
protected function process()
    {

        // initialize the array for the artefacts
        $this->artefacts = array();

        // process the images/additional images
        $this->processImages();
        $this->processAdditionalImages();

        // append the artefacts that has to be exported to the subject
        $this->addArtefacts($this->artefacts);
    }
80883
public function process()
    {
        $saIni = $this->getSiteAccessIni();
        $this->destinationLocale = $saIni->variable( 'RegionalSettings', 'ContentObjectLocale' );

        // Detect the type of siteaccess we are dealing with. Initially URI and Host are supported.
        // We don't want the siteaccess part here, since we are inserting our siteaccess name.
        $indexFile = trim( eZSys::indexFile( false ), '/' );
        switch ( $GLOBALS['eZCurrentAccess']['type'] )
        {
            case eZSiteAccess::TYPE_URI:
                eZURI::transformURI( $host, true, 'full' );
                break;

            default:
                $host = $saIni->variable( 'SiteSettings', 'SiteURL' );
                $host = eZSys::serverProtocol()."://".$host;
                break;
        }
        $this->baseDestinationUrl = "{$host}{$indexFile}";
    }
1346575
public function process()
    {
        //formulate the request and response
        $request = $this->getRequest();
        $response = $this->getResponse();
        
        //register shutdown
        register_shutdown_function(function ($server) {
            $server->trigger('server-end');
        }, $this);
        
        //if it's not a child
        if (!($this->parentServer instanceof Index)) {
            //handle errors in case
            $this->handleErrors($request, $response);
        }
        
        //if we are Good, route
        if ($this->processGlobal($request, $response)) {
            //if no routing on this
            if (!$this->processRoutes($request, $response)) {
                $response->set('code', 404);
                
                //throw an exception
                Exception::i()
                    ->setMessage(self::NOT_FOUND)
                    ->setType(self::RESPONSE_ERROR_TYPE)
                    ->trigger();
            }
        }
        
        //do we have a body ?
        $body = $response->get('body');
        
        if ($body === null
        || !is_scalar($body)
        || !strlen((string) $body)) {
            $response->set('code', 404);
            
            //throw an exception
            Exception::i()
                ->setMessage(self::NOT_FOUND)
                ->setType(self::RESPONSE_ERROR_TYPE)
                ->trigger();
        }
        
        return array($request, $response);
    }
508828
public function process()
	{
		$context = $this->getContext();
		$view = $this->getView();

		try
		{
			$site = $context->getLocale()->getSite()->getCode();
			$params = $this->getClientParams( $view->param() );
			$context->getSession()->set( 'aimeos/catalog/detail/params/last/' . $site, $params );

			parent::process();
		}
		catch( \Aimeos\Client\Html\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
			$view->detailErrorList = $view->get( 'detailErrorList', [] ) + $error;
		}
		catch( \Aimeos\Controller\Frontend\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
			$view->detailErrorList = $view->get( 'detailErrorList', [] ) + $error;
		}
		catch( \Aimeos\MShop\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
			$view->detailErrorList = $view->get( 'detailErrorList', [] ) + $error;
		}
		catch( \Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
			$view->detailErrorList = $view->get( 'detailErrorList', [] ) + $error;
			$this->logException( $e );
		}
	}
620345
private void executeGlobalPreprocessing(List<JoinableResourceBundle> bundlesToBuild, boolean processBundleFlag,
			StopWatch stopWatch) {

		stopProcessIfNeeded();

		if (resourceTypePreprocessor != null) {
			if (stopWatch != null) {
				stopWatch.start("Global preprocessing");
			}
			GlobalPreprocessingContext ctx = new GlobalPreprocessingContext(config, resourceHandler, processBundleFlag);
			resourceTypePreprocessor.processBundles(ctx, bundles);

			// Update the list of bundle to rebuild if new bundles have been
			// detected as dirty in the global preprocessing phase
			List<JoinableResourceBundle> currentBundles = getBundlesToRebuild();
			for (JoinableResourceBundle b : currentBundles) {
				if (!bundlesToBuild.contains(b)) {
					bundlesToBuild.add(b);
				}
			}
			if (stopWatch != null) {
				stopWatch.stop();
			}
		}
	}
820490
def _ProcessSources(self, sources, parser_factory):
    """"""
    for source in sources:
      for action, request in self._ParseSourceType(source):
        yield self._RunClientAction(action, request, parser_factory,
                                    source.path_type)
300090
public function process()
    {
        $rule = $this->getComponent();
        $context = $this->getContext();

        $processor = $this->getRuleProcessorFactory()->createProcessor($rule);
        $processor->setState($context);
        $processor->process();

        $this->trace($rule->getQtiClassName());
    }
1339141
public function process()
	{
		try
		{
			parent::process();
		}
		catch( \Exception $e )
		{
			$this->getContext()->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
		}
	}
1112777
public function process()
    {
        if (!$this->isInitialized()) {
            $this->init();
        }

        if ($this->getFirstAncestor('SwatForm') !== null) {
            $this->getCompositeWidget('check_all')->process();
        }

        $this->processed = true;

        if ($this->tile !== null) {
            $this->tile->process();
        }
    }
74848
protected function doProcess(): void
    {
        $module = Request::getModule();
        $controller = Request::getController();
        $params = Request::getParams();

        try {
            // try to dispatch controller
            $result = $this->dispatch($module, $controller, $params);
        } catch (ForbiddenException $e) {
            // dispatch default error controller
            $result = $this->forbidden($e);
        } catch (RedirectException $e) {
            // should return `null` for disable output and setup redirect headers
            $result = $this->redirect($e);
        } catch (\Exception $e) {
            // dispatch default error controller
            $result = $this->error($e);
        }

        // setup layout, if needed
        if ($this->useLayout()) {
            // render view to layout
            // needed for headScript and headStyle helpers
            Layout::setContent($result->render());
            Response::setBody(Layout::getInstance());
        } else {
            Response::setBody($result);
        }
    }