process

@access protected
@return string
438367
protected function process()
    {
        extract($this->compileExpression());

        $this->clean();
        $this->resolver->close();

        $this->resolver->setParameter($params);
        $this->resolver->setSource($source);
        $this->resolver->setFilter($filter);

        if ($image = $this->resolver->getCached()) {
            $src = $this->base.$this->resolver->getCachedUrl($image);

            $extension = $image->getSourceFormat(true);
            $this->resolver->close();
            $image->close();

            return $src.'.'.$extension;
        }

        if ($image = $this->resolver->resolve($image)) {
            $src = $this->resolver->getImageUrl($image);
            $this->resolver->close();
            $image->close();

            return $src;
        }

        $this->resolver->close();

        return;
    }
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 );
		}
	}
731019
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;
        }

        // load the category by it's path
        $category = $this->loadCategory($this->mapPath($path));

        // FIRST delete the data related with the category with the passed category path
        $this->deleteUrlRewrite(array(ColumnKeys::PATH => $category[MemberNames::PATH]), SqlStatementKeys::DELETE_URL_REWRITE_BY_PATH);
        $this->deleteUrlRewrite(array(MemberNames::CATEGORY_ID => $category[$this->getPkMemberName()]), SqlStatementKeys::DELETE_URL_REWRITE_BY_CATEGORY_ID);

        // delete the category with the passed path
        $this->deleteCategory(array(ColumnKeys::PATH => $category[MemberNames::PATH]));

        // remove the path => entity ID mapping from the subject
        $this->removePathEntityIdMapping($path);

        // store the ID of the last deleted category
        $this->setLastEntityId($category[$this->getPkMemberName()]);
    }
863863
public function generate()
    {
        $options = $this->options;

        $arguments = array_merge([$this->binary], (array) $this->arguments);
        $script    = implode(' ', array_map([ProcessUtils::class, 'escapeArgument'], $arguments));
        $process   = new Process(
            $this->applyForceToBackground($script),
            $this->workingDirectory,
            $this->getEnvironmentVariables(),
            $this->input,
            $this->timeout,
            $options
        );

        if ($this->outputDisabled) {
            $process->disableOutput();
        }

        return $process;
    }
952046
public function process()
    {
        $logger = $this->getLogger();
        $logger->log("Starting...\n");

        $formatter = $this->createFormatter();
        $parser    = $this->createParser();
        $outputDir = $this->configuration->get('output');
        $sources   = $this->configuration->getSources();
        $count     = count($sources);

        $logger->log("Using {$outputDir} as output directory.\n\n");

        foreach ($sources as $pinocchio) {
            $outputFile = $outputDir . '/' . $pinocchio->getOutputFilename($this->configuration->get('source'));

            $logger->log("Processing {$pinocchio->getTitle()} into {$outputFile}...");

            $formatter->format($parser->parse($pinocchio), $outputFile);

            $logger->log(" Done\n");
        }

        if (!$this->configuration->get('skipIndex')) {
            $logger->log("\nCreating index page at {$outputDir}/index.html.\n");

            $this->createIndexFile($sources, $outputDir);
        }

        $logger->log("\nFinished processing {$count} source files.\n");
    }
332182
public function process()
    {
        $msgs = $this->getMessages();
        foreach ($msgs as $aMsg) {
            $this->logger->debug(
                '------ Received: ------ ' . "\n" . $aMsg . "\n\n"
            );
            $resPos = strpos($aMsg, 'Response:');
            $evePos = strpos($aMsg, 'Event:');
            if (($resPos !== false) &&
              (($resPos < $evePos) || $evePos === false)
            ) {
                $response = $this->messageToResponse($aMsg);
                $this->incomingQueue[$response->getActionId()] = $response;
            } elseif ($evePos !== false) {
                $event = $this->messageToEvent($aMsg);
                $response = $this->findResponse($event);
                if ($response === false || $response->isComplete()) {
                    $this->dispatch($event);
                } else {
                    $response->addEvent($event);
                }
            } else {
                // broken ami.. sending a response with events without
                // Event and ActionId
                $bMsg = 'Event: ResponseEvent' . "\r\n";
                $bMsg .= 'ActionId: ' . $this->lastActionId . "\r\n" . $aMsg;
                $event = $this->messageToEvent($bMsg);
                $response = $this->findResponse($event);
                $response->addEvent($event);
            }
            $this->logger->debug('----------------');
        }
    }
128145
public function process()
    {
        $context = $this->getContext();
        $templateProcessing = $this->getComponent();
        $trialCount = 0;
        
        // Make a copy of possibly impacted variables.
        $impactedVariables = Utils::templateProcessingImpactedVariables($templateProcessing);
        
        $tplVarCopies = array();
        foreach ($impactedVariables as $varIdentifier) {
            $tplVarCopies[] = clone $context->getVariable($varIdentifier);
        }
        
        do {
            $validConstraints = true;
            
            try {
                $trialCount++;
                
                foreach ($templateProcessing->getTemplateRules() as $rule) {
                    $processor = $this->getRuleProcessorFactory()->createProcessor($rule);
                    $processor->setState($context);
                    $processor->process();
                    $this->trace($rule->getQtiClassName() . ' executed.');
                }
            } catch (RuleProcessingException $e) {
                if ($e->getCode() === RuleProcessingException::EXIT_TEMPLATE) {
                    $this->trace('Termination of template processing.');
                } else if ($e->getCode() === RuleProcessingException::TEMPLATE_CONSTRAINT_UNSATISFIED) {
                    $this->trace('Unsatisfied template constraint.');
                    
                    // Reset variables with their originals.
                    foreach ($tplVarCopies as $copy) {
                        $context->getVariable($copy->getIdentifier())->setValue($copy->getDefaultValue());
                        $context->getVariable($copy->getIdentifier())->setDefaultValue($copy->getDefaultValue());
                        
                        if ($copy instanceof ResponseVariable) {
                            $context->getVariable($copy->getIdentifier())->setCorrectResponse($copy->getCorrectResponse());
                        }
                    }

                    $validConstraints = false;
                } else {
                    throw $e;
                }
            }
        } while ($validConstraints === false && $trialCount < 100);
    }
493235
public function process()
    {
        parent::process();

        $data = &$this->getForm()->getFormData();

        if (isset($data[$this->id])) {
            $this->clicked = true;
            $this->getForm()->button = $this;
        }
    }
1152911
public function process()
    {
        /*
         | Check for argument database name if not given we will use default
         |  database connection
         */
        $this->database = (!is_null($this->argument('database'))) ?
            $this->argument('database') :
            $this->table()->getDefaultDatabaseConnection();

        $this->tableName = (!is_null($this->argument('name'))) ?
            $this->argument('name') :
            'Form';

        $this->columns = $this->getColumns();
        $this->applicationDir = realpath(CYGNITE_BASE.DS.APPPATH);
        $this->generateForm();

        $this->info('Form '.APPPATH.'/Form/'.Inflector::classify($this->tableName).'Form'.EXT.' Generated Successfully!.');
    }
1025194
public function process() /*: mixed*/
    {
        if(!isset($this->settings["directives"]))
            return $this->value;
        $directives = $this->settings["directives"];
        $isDirectiveEnabled = function(string $param) use($directives): bool
        {
            return (isset($directives[$param]) && $directives[$param]);
        };

        if($isDirectiveEnabled("index")) {
            $this->with_index = true;
        }

        if($isDirectiveEnabled("unique")) {
            $this->is_unique = true;
        }

        if($isDirectiveEnabled("sha1")) {
            return sha1($this->value);   
        }
        elseif($isDirectiveEnabled("md5")) {
            return md5($this->value);
        }

        return $this->value;
    }
541114
public function process()
	{
		if( ( $id = $this->getView()->param( 'd-product-id' ) ) !== null )
		{
			$context = $this->_getContext();
			$session = $context->getSession();
			$lastSeen = $session->get( 'arcavias/catalog/session/seen/list', array() );

			if( isset( $lastSeen[$id] ) )
			{
				$html = $lastSeen[$id];
				unset( $lastSeen[$id] );
				$lastSeen[$id] = $html;
			}
			else
			{
				/** client/html/catalog/session/seen/default/maxitems
				 * Maximum number of products displayed in the "last seen" section
				 *
				 * This option limits the number of products that are shown in the
				 * "last seen" section after the user visited their detail pages. It
				 * must be a positive integer value greater than 0.
				 *
				 * @param integer Number of products
				 * @since 2014.03
				 * @category User
				 * @category Developer
				 */
				$max = $this->_getContext()->getConfig()->get( 'client/html/catalog/session/seen/default/maxitems', 6 );

				$lastSeen[$id] = $this->_getHtml( $id );
				$lastSeen = array_slice( $lastSeen, -$max, $max, true );
			}

			$session->set( 'arcavias/catalog/session/seen/list', $lastSeen );

			foreach( $session->get( 'arcavias/catalog/session/seen/cache', array() ) as $key => $value ) {
				$session->set( $key, null );
			}
		}

		parent::process();
	}
618224
public function process()
	{
		// Get this request's data.
		$this->parseRequest();

		// Perform logic.
		$this->execute();

		// Parse the result of our business logic.
		$this->parseResult();

		// Build the Response utilizing status, type, body, etc.
		$this->buildResponse();

		// Finally, return the Response.
		return $this->respond();
	}
1296444
public function processar()
    {
        if ($this->isProcessado()) {
            return $this;
        }

        if (method_exists($this, 'init')) {
            call_user_func([$this, 'init']);
        }

        foreach ($this->file as $linha) {
            $inicio = $this->rem(1, 1, $linha);

            if ($inicio == '0') {
                $this->processarHeader($linha);
            } elseif ($inicio == '9') {
                $this->processarTrailer($linha);
            } else {
                $this->incrementDetalhe();
                if ($this->processarDetalhe($linha) === false) {
                    unset($this->detalhe[$this->increment]);
                    $this->increment--;
                }
            }
        }
        if (method_exists($this, 'finalize')) {
            call_user_func([$this, 'finalize']);
        }

        return $this->setProcessado();
    }
345500
protected function doProcess()
    {
        $links = $this->links;
        $meta = $this->meta;

        if ($this->value) {
            $links->add(
                [
                    'rel'  => 'image_src',
                    'href' => $this->value
                ]
            );
            $meta->add(
                [
                    'name' => 'image',
                    'property' => 'og:image',
                    'content' => $this->value
                ]
            );
        }

        return true;
    }
142574
private function process()
    {
        $inputs = $this->inputs;
        $rules = $this->rules;
        $attributes = $this->attributes;
        $filters = $this->filters;
        $messages = $this->messages;

        foreach ($rules as $name => $rule) {
            // Check for a subrule syntax: rule[key].
            if (preg_match('/(.+)'.preg_quote($this->delimiters[0]).'(.+)'.preg_quote($this->delimiters[1]).'/', $name, $matches)) {
                $realName = $matches[1];
                $subName = $matches[2];

                if (! isset($inputs[$realName]) or ! is_array($inputs[$realName])) continue;

                // An all modifier is found: rule[*].
                if ($subName == '*') {
                    $subInputs = $inputs[$realName];

                    foreach ($subInputs as $subKey => $subValue) {
                        $inputs[$realName.'_'.$subKey] = $subValue;

                        $rules = $this->fixRules($rules, $rule, $name, $realName, $subKey);
                        $messages = $this->fixMessages($messages, $name, $realName, $subKey);

                        if (isset($attributes[$name])) {
                            $attributes = $this->fixRules($attributes, $attributes[$name], $name, $realName, $subKey);
                        }

                        if (isset($filters[$name])) {
                            $filters = $this->fixRules($filters, $filters[$name], $name, $realName, $subKey);
                        }
                    }

                    $messages = $this->removeMessage($messages);

                    unset($inputs[$realName]);
                    unset($rules[$name]);

                    if (isset($attributes[$name])) {
                        unset($attributes[$name]);
                    }

                    if (isset($filters[$name])) {
                        unset($filters[$name]);
                    }
                }
                // A specific subrule is found.
                elseif (isset($inputs[$realName][$subName])) {
                    $rules[$realName.'_'.$subName] = $rule;
                    $inputs[$realName.'_'.$subName] = $inputs[$realName][$subName];
                    $rules = $this->fixRules($rules, $rule, $name, $realName, $subName);

                    if (isset($attributes[$name])) {
                        $attributes = $this->fixRules($attributes, $attributes[$name], $name, $realName, $subName);
                        unset($attributes[$name]);
                    }

                    if (isset($filters[$name])) {
                        $filters = $this->fixRules($filters, $filters[$name], $name, $realName, $subName);
                        unset($filters[$name]);
                    }

                    unset($rules[$name]);
                    unset($inputs[$realName][$subName]);

                    if (! count($inputs[$realName])) {
                        unset($inputs[$realName]);
                    }

                    $messages = $this->fixMessages($messages, $name, $realName, $subName);
                    $messages = $this->removeMessage($messages);
                }
            }
        }

        $this->inputs = $inputs;
        $this->rules = $rules;
        $this->attributes = $attributes;
        $this->filters = $filters;
        $this->messages = $messages;
    }
1166875
public function process ()
    {
        if ($this->isProcessed)
            return;
        $this->isProcessed = true;
        foreach ($this->getFields() as $field)
            /* @var $field Field */
            $field->preprocess();
        $this->isUserSubmitted = $this->getValue($this->getSubmitConfirmFieldName(), 'false') == 'true' || $this->forceSubmit;
        if ($this->isUserSubmitted) {
            foreach ($this->getFields() as $field)
                $field->restoreValue($this->method);

            $this->activateHandlers();

            if ($this->isValid()) {
                $this->submit();
            }
        }
    }
678267
public function Process ()
	{

		// Set redirect path

		$redirect	= isset ($_SERVER['REQUEST_URI'])? strtok ($_SERVER['REQUEST_URI'], '?') : '';

		/**
		 * Action is the last section after the final /
		 * Controller is the path before it
		 */

		// Get the position of the last / in the URL

		$pos			= strrpos ($redirect, '/');

		// Set the action

		$this->action	= substr ($redirect, $pos+1);

		if (!$this->action)
		{
			$this->action	= 'index';
		}

		// Set controller, if there is no / besides the first one then there is no controller

		$controller		= ($pos < 1)? '' : substr ($redirect, 1, $pos-1);

		// If there is a controller
		// Split controller by module and uppercase first character of each module
		// to keep in fitting with the rest of the framework

		if ($controller)
		{

			$arrController	= explode ('/', $controller);

			foreach ($arrController as &$controllerModule)
			{
				$controllerModule	= ucfirst ($controllerModule);
			}

			// Replace / in controller with \ for correct path and set controller

			$this->controller	= join ('\\', $arrController);

		}

	}