Builds the processor that takes care
of dispatching the request.

If you want to process the request before
it reaches your code, you can do that
by overriding this method and adding your own
processor to the chain.
@return Processor
164585
protected function dispatchProcessor()
    {
        $processors          = $this->builder->components()->processors();
        $frameworkProcessors = $this->builder->processors();

        return $processors->chain(array(
            $this->builder->configuration()->httpProcessor(),
            $frameworkProcessors->httpNormalizeResponse(),
        ));
    }
370391
public function process()
    {
        if (isset($this->initialized['process'])) {
            return;
        }

        // Initialize Grav if needed.
        $this->setup();

        $this->initialized['process'] = true;

        $container = new Container(
            [
                'configurationProcessor' => function () {
                    return new ConfigurationProcessor($this);
                },
                'loggerProcessor' => function () {
                    return new LoggerProcessor($this);
                },
                'errorsProcessor' => function () {
                    return new ErrorsProcessor($this);
                },
                'debuggerProcessor' => function () {
                    return new DebuggerProcessor($this);
                },
                'initializeProcessor' => function () {
                    return new InitializeProcessor($this);
                },
                'backupsProcessor' => function () {
                    return new BackupsProcessor($this);
                },
                'pluginsProcessor' => function () {
                    return new PluginsProcessor($this);
                },
                'themesProcessor' => function () {
                    return new ThemesProcessor($this);
                },
                'schedulerProcessor' => function () {
                    return new SchedulerProcessor($this);
                },
                'requestProcessor' => function () {
                    return new RequestProcessor($this);
                },
                'tasksProcessor' => function () {
                    return new TasksProcessor($this);
                },
                'assetsProcessor' => function () {
                    return new AssetsProcessor($this);
                },
                'twigProcessor' => function () {
                    return new TwigProcessor($this);
                },
                'pagesProcessor' => function () {
                    return new PagesProcessor($this);
                },
                'debuggerAssetsProcessor' => function () {
                    return new DebuggerAssetsProcessor($this);
                },
                'renderProcessor' => function () {
                    return new RenderProcessor($this);
                },
            ]
        );

        $default = function (ServerRequestInterface $request) {
            return new Response(404);
        };

        /** @var Debugger $debugger */
        $debugger = $this['debugger'];

        $collection = new RequestHandler($this->middleware, $default, $container);

        $response = $collection->handle($this['request']);

        $this->header($response);
        echo $response->getBody();

        $debugger->render();

        register_shutdown_function([$this, 'shutdown']);
    }
1335756
public function build(): DispatchKeyEventRequest
	{
		$instance = new DispatchKeyEventRequest();
		if ($this->type === null) {
			throw new BuilderException('Property [type] is required.');
		}
		$instance->type = $this->type;
		$instance->modifiers = $this->modifiers;
		$instance->timestamp = $this->timestamp;
		$instance->text = $this->text;
		$instance->unmodifiedText = $this->unmodifiedText;
		$instance->keyIdentifier = $this->keyIdentifier;
		$instance->code = $this->code;
		$instance->key = $this->key;
		$instance->windowsVirtualKeyCode = $this->windowsVirtualKeyCode;
		$instance->nativeVirtualKeyCode = $this->nativeVirtualKeyCode;
		$instance->autoRepeat = $this->autoRepeat;
		$instance->isKeypad = $this->isKeypad;
		$instance->isSystemKey = $this->isSystemKey;
		$instance->location = $this->location;
		return $instance;
	}
1004140
public function build(): Client
    {
        return new Client(
            new CommandBus(
                [
                    new LockingMiddleware(),
                    new ExceptionMiddleware(),
                    new ValidationMiddleware(),
                    new CommandHandlerMiddleware(
                        new ClassNameExtractor(),
                        new CallableLocator($this->getCommandResolver()),
                        new ClassNameWithoutSuffixInflector('Request')
                    )
                ]
            )
        );
    }
1311218
public function getPreprocessor(): MiddlewareInterface
    {
        if (is_null($this->preProcessor)) {
            if (method_exists($this, 'resolve')) {
                $this->setPreprocessor($this->resolve(Middleware::class));
            } else {
                $this->setPreprocessor(new Middleware());
            }
        }

        return $this->preProcessor;
    }
1044835
public function processPaymentAction()
    {
        $order = $this->checkRequest();

        return $this->getDebugPayment()->processCallback($order, $this->getCurrentRequest()->get('action'));
    }
574603
public function process($processor) {
        if (!$processor instanceof base_processor) { // No correct processor, throw exception
            throw new base_element_struct_exception('incorrect_processor');
        }

        $iterator = $this->get_iterator($processor); // Get the iterator over backup-able data

        foreach ($iterator as $key => $values) { // Process each "ocurrrence" of the nested element (recordset or array)

            // Fill the values of the attributes and final elements with the $values from the iterator
            $this->fill_values($values);

            // Perform pre-process tasks for the nested_element
            $processor->pre_process_nested_element($this);

            // Delegate the process of each attribute
            foreach ($this->get_attributes() as $attribute) {
                $attribute->process($processor);
            }

            // Main process tasks for the nested element, once its attributes have been processed
            $processor->process_nested_element($this);

            // Delegate the process of each final_element
            foreach ($this->get_final_elements() as $final_element) {
                $final_element->process($processor);
            }

            // Delegate the process to the optigroup
            if ($this->get_optigroup()) {
                $this->get_optigroup()->process($processor);
            }

            // Delegate the process to each child nested_element
            foreach ($this->get_children() as $child) {
                $child->process($processor);
            }

            // Perform post-process tasks for the nested element
            $processor->post_process_nested_element($this);

            // Everything processed, clean values before next iteration
            $this->clean_values();

            // Increment counter for this element
            $this->counter++;

            // For root element, check we only have 1 element
            if ($this->get_parent() === null && $this->counter > 1) {
                throw new base_element_struct_exception('root_only_one_ocurrence', $this->get_name());
            }
        }
        // Close the iterator (DB recordset / array iterator)
        $iterator->close();
    }
873309
public function build(): SetAsyncCallStackDepthRequest
	{
		$instance = new SetAsyncCallStackDepthRequest();
		if ($this->maxDepth === null) {
			throw new BuilderException('Property [maxDepth] is required.');
		}
		$instance->maxDepth = $this->maxDepth;
		return $instance;
	}
992836
def process(self, processor:PreProcessors=None):
        ""
        if processor is not None: self.processor = processor
        self.processor = listify(self.processor)
        for p in self.processor: p.process(self)
        return self
300834
public function setProcessor(string $processorId, callable $processor): self
    {
        $this->_processors[$processorId] = $processor;

        return $this;
    }
441406
public function build() {
        $this->prepareHandlers();
        $this->renderedCode = new RenderedCode();
        $this->renderedCode->setDirectives($this->buildDirectives())
                           ->setGlobalCode($this->buildGlobalCode())
                           ->setMainFunction($this->buildMainFunction());
        return $this;
    }
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();
	}
254717
public function load()
    {
        $this->addHandlers($this->resolveHandlers($this->loggerOptions, $this->handlers));
        $this->addProcessors($this->resolveProcessors($this->loggerOptions, $this->processors));

        return $this->logger;
    }
307873
public function process()
    {
        $operands = $this->getOperands();

        if ($operands->containsNull() === true) {
            return new QtiInteger(0);
        }

        if ($operands->exclusivelyMultipleOrOrdered() === false) {
            $msg = "The ContainerSize operator only accepts operands with a multiple or ordered cardinality.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_CARDINALITY);
        }

        return new QtiInteger(count($operands[0]));
    }
480860
public function process()
    {
        if (!$this->canRun(false)) {
            return $this;
        }
        $this->runNow(!$this->isAlwaysTask());
        return $this;
    }
972474
public function createCore()
    {
        $config = new MemoryConfigCollection();

        // Set default middleware
        $config->setMiddlewares([
            new InheritanceMiddleware(Config::UNINHERITED),
            new ExtensionMiddleware(Config::EXCLUDE_EXTRA_SOURCES),
        ]);

        // Transform
        $config->transform([
            $this->buildStaticTransformer(),
            $this->buildYamlTransformer()
        ]);

        return $config;
    }
259496
protected function createProcessPoolPerQueue()
    {
        return collect(explode(',', $this->options->queue))->map(function ($queue) {
            return $this->createProcessPool($this->options->withQueue($queue));
        });
    }