Automatically generated run method

@param Request $request
@param PayloadInterface $payload
@return Response
775810
public function run(Request $request, PayloadInterface $payload = null) {
		return new Response($this->render('/keeko/account/templates/change-password.twig', [
			'target' => $request->getUri(),
			'submitted' => $request->isMethod('POST'),
			'success' => $payload instanceof Success
		]));
	}
508968
public function execute(RequestInterface $request): ResponseInterface
    {
        $this->supports($request);

        if ($request instanceof InputInterface) {
            $request->validate();
        }

        $client = $this->getClient();

        $data = array_replace($request->toArray(), [
            'carrier' => $client->getCarrier(),
            'key'     => $client->getKey(),
        ]);

        $response = $client->call($this->getMethodName(), $data);

        return $this->parseResponse($response->getBody()->getContents());
    }
759760
protected static function executeCall(
        $method,
        $payLoad,
        $headers = array(),
        $apiContext = null,
        $soapCall = null,
        $handlers = array('PayU\Handler\BasicAuthHandler'),
        $path = ''
    )
    {
        //Initialize the context and rest call object if not provided explicitly
        $apiContext = $apiContext ? $apiContext : new ApiContext(self::$credential);
        self::$apiContext = $apiContext;
        $soapCall = $soapCall ? $soapCall : new SoapCall($apiContext);

        //Make the execution call
        $json = $soapCall->execute($method, $payLoad, $handlers, $headers, $path);
        return $json;
    }
157308
public function payload($payload, $format = '', $container = 'data')
    {
        $class = $this->getFormatClass($format);
        return $this->generate($payload, new $class, $container);
    }
693416
public function runAction(Request $request)
    {
        // Get params from request
        $params = $this->getPostJson($request);

        // check params against ES mapping
        $this->checkMappingParams($params);

        // Create new job
        $job = $this->createJob('run', $params);

        // Add job to Elasticsearch
        try {
            /** @var JobMapper $jobMapper */
            $jobMapper = $this->container->get('syrup.elasticsearch.current_component_job_mapper');
            $jobId = $jobMapper->create($job);
        } catch (\Exception $e) {
            throw new ApplicationException("Failed to create job", $e);
        }

        // Add job to SQS
        $queueName = 'default';
        $queueParams = $this->container->getParameter('queue');

        if (isset($queueParams['sqs'])) {
            $queueName = $queueParams['sqs'];
        }
        $messageId = $this->enqueue($jobId, $queueName);

        $this->logger->info('Job created', [
            'sqsQueue' => $queueName,
            'sqsMessageId' => $messageId,
            'job' => $job->getLogData()
        ]);

        $jobResource = $job->getLogData();
        $jobResource['url'] = $this->getJobUrl($jobId);

        // Response with link to job resource
        return $this->createJsonResponse($jobResource, 202);
    }
425857
public function execute(array $payload): JsonResponse
    {
        $challenge = $payload['challenge'] ?? null;
        if ($challenge) {
            return new JsonResponse(['challenge' => $challenge]);
        }

        throw new RuntimeException();
    }
685419
private function doRun(RequestInterface $request, ResponseInterface $response): void
    {
        $throwable = null;

        foreach ($this->plugins as $plugin) {
            if ($plugin->onPreRequest($this, $request, $response)) {
                return;
            }
        }

        try {
            $this->handleRequest($request, $response);
        } catch (\Throwable $throwable) {
            $this->throwableToResponse($throwable, $response);
        }

        if ($response->getStatusCode()->isError()) {
            $this->handleError($request, $response, $throwable);
        }

        foreach ($this->plugins as $plugin) {
            if ($plugin->onPostRequest($this, $request, $response)) {
                return;
            }
        }
    }
867652
public function run(ServerRequestInterface $request = null)
    {
        $request = $request ?: ServerRequestFactory::fromGlobals();

        $response = $this->handle($request);

        $this->responseEmitter->emit($response);
    }
1331174
public function run(Request $request) {
		$page = $this->getServiceContainer()->getKernel()->getApplication()->getPage();
		$page->setTitle($this->getServiceContainer()->getTranslator()->trans('change_password'));

		$payload = new Blank();
		if ($request->isMethod('POST')) {
			$post = $request->request;
			$auth = $this->getServiceContainer()->getAuthManager();
			$user = $auth->getUser();
			$payload = new Failed();

			if ($post->has('password') && $auth->verifyUser($user, $post->get('password'))) {
				$pwA = $post->get('new_password');
				$pwB = $post->get('new_password_confirm');

				if ($pwA == $pwB) {
					$user->setPassword($auth->encryptPassword($pwA));
					$user->save();
					$payload = new Success();
				}
			}
		}

		return $this->responder->run($request, $payload);
	}
324267
public function run(Request $request) {
		$page = $this->getServiceContainer()->getKernel()->getApplication()->getPage();
		$page->setTitle($this->getServiceContainer()->getTranslator()->trans('profile'));

		$payload = new Blank();
		if ($request->isMethod('POST')) {
			$post = $request->request;
			$user = $this->getServiceContainer()->getAuthManager()->getUser();
			$domain = new UserDomain($this->getServiceContainer());
			$serializer = User::getSerializer();

			$fields = $serializer->getFields();
			$fields[] = 'display_name_user_select';
			$attribs = [];

			foreach ($fields as $field) {
				if ($post->has($field)) {
					$attribs[$field] = $post->get($field);
				}
			}

			$payload = $domain->update($user->getId(), ['attributes' => $attribs]);
		}
		return $this->responder->run($request, $payload);
	}
1074041
public function trigger(Payload $payload)
    {
        if (!$this->command) {
            return $this->targetState();
        }

        return call_user_func($this->command, $payload) ? $this->targetState() : $this->errorState();
    }
478262
public function triggerEvent($event, Payload $payload): string
    {
        return $this->state($payload->state())->triggerEvent($event, $payload);
    }
1016839
public function respondCreatedWithPayload($payload = null, $message = "Created")
    {

        $reponse = $this->setStatusCode(ResponseHTTP::HTTP_CREATED)
            ->respondWithMessageAndPayload($payload, $message);
        return $reponse;
    }
200605
public function run(Request $request) {
		$info = Embed::create($request->query->get('url'));

		return $this->responder->run($request, new Found(['info' => $info]));
	}
1111589
public function run (Request $request)
    {
        try {

            // Define which method we need to handle
            $this->method = $request->getMethod();

            // Set request
            $this->request = $request;

            // Handle all routes
            $numHandled = 0;
            if (isset($this->routes[$this->method]))
                $numHandled = $this->handle($this->routes[$this->method], true);

            // If no route was handled, trigger the 404 (if any)
            if ($numHandled == 0) {
                if ($this->notFound) {
                    //call_user_func($this->notFound);
                    $this->handleMatch($this->notFound, array());
                } else {

                    $request = Response::error('Page not found.', Response::STATUS_NOTFOUND);
                    $request->output();
                }
            }

            // If it originally was a HEAD request, clean up after ourselves by emptying the output buffer
            if ($_SERVER['REQUEST_METHOD'] == 'HEAD') ob_end_clean();

        } catch (ResponseException $e) {
            $e->getResponse()->output();
        }
    }
878755
public function handlePayload(Payload $payload): void
    {
        $app = $this->getClientApplication();

        $this->logger->debug('Handling payload: ' . $payload->getPayload());

        switch ($type = $payload->getType()) {
            case Protocol::TYPE_TEXT:
                if (method_exists($app, 'onData')) {
                    $app->onData((string)$payload, $this);
                }
                return;

            case Protocol::TYPE_BINARY:
                if (method_exists($app, 'onBinaryData')) {
                    $app->onBinaryData((string)$payload, $this);
                } else {
                    $this->close(1003);
                }
                break;

            case Protocol::TYPE_PING:
                $this->logger->info('Ping received', 'notice');
                $this->send($payload->getPayload(), Protocol::TYPE_PONG);
                $this->logger->info('Pong!', 'debug');
                break;

            /**
             * A Pong frame MAY be sent unsolicited.  This serves as a
             * unidirectional heartbeat.  A response to an unsolicited Pong
             * frame is not expected.
             */
            case Protocol::TYPE_PONG:
                $this->logger->info('Received unsolicited pong');
                break;

            case Protocol::TYPE_CLOSE:
                $this->logger->notice('Close frame received');
                $this->close();
                $this->logger->info('Disconnected');
                break;

            default:
                throw new ConnectionException('Unhandled payload type');
        }
    }
884231
private function respond(Request $request, string $buffer): \Generator
    {
        try {
            $method = $request->getMethod();

            if (!\in_array($method, $this->options->getAllowedMethods(), true)) {
                if (!\in_array($method, HttpDriver::KNOWN_METHODS, true)) {
                    $response = yield from $this->makeNotImplementedResponse();
                } else {
                    $response = yield from $this->makeMethodNotAllowedResponse();
                }
            } elseif ($method === "OPTIONS" && $request->getUri()->getPath() === "") {
                $response = $this->makeOptionsResponse();
            } else {
                $response = yield $this->requestHandler->handleRequest(clone $request);

                if (!$response instanceof Response) {
                    throw new \Error("At least one request handler must return an instance of " . Response::class);
                }
            }
        } catch (ClientException $exception) {
            $this->close();
            return;
        } catch (\Throwable $exception) {
            $this->logger->error($exception);
            $response = yield from $this->makeExceptionResponse($request);
        } finally {
            $this->pendingResponses--;
        }

        if ($this->status & self::CLOSED_WR) {
            return; // Client closed before response could be sent.
        }

        $promise = $this->httpDriver->write($request, $response);

        if ($response->isUpgraded()) {
            yield $promise; // Wait on writing response when the response is an upgrade response.
            $this->export($response->getUpgradeCallable(), $buffer);
        }
    }