{@inheritdoc}

@see \Mcustiel\PowerRoute\Actions\ActionInterface::execute()
499026
public function execute(TransactionData $transactionData, $argument = null)
    {
        $list = json_encode($this->storage->listExpectations());

        $transactionData->setResponse(
            $transactionData->getResponse()
            ->withBody(new StringStream($list))
            ->withHeader('Content-type', 'application/json')
        );
    }
450826
public function execute()
    {
        $packages = ['updates' => [], 'installs' => []];

        // Get known installed packages
        $rootPackage = $this->app['extend.action']['show']->execute('installed');

        /** @var \Bolt\Filesystem\Handler\JsonFile $jsonFile */
        $jsonFile = $this->getOptions()->composerJson();

        // Get the packages that a set as "required" in the JSON file
        $json = $jsonFile->parse();
        $jsonRequires = isset($json['require']) ? (array) $json['require'] : [];

        /** @var string $packageName */
        /** @var string $versionConstraint */
        foreach ($jsonRequires as $packageName => $versionConstraint) {
            try {
                $remote = $this->findBestVersionForPackage($packageName, $versionConstraint, true);
            } catch (\Exception $e) {
                $msg = sprintf('%s received an error from Composer: %s in %s::%s', __METHOD__, $e->getMessage(), $e->getFile(), $e->getLine());
                $this->app['logger.system']->critical($msg, ['event' => 'exception', 'exception' => $e]);

                throw new PackageManagerException($e->getMessage(), $e->getCode(), $e);
            }
            if (!is_array($remote)) {
                continue;
            }

            if (array_key_exists($packageName, $rootPackage)) {
                $rootVer = isset($rootPackage[$packageName]['versions']) ? $rootPackage[$packageName]['versions'] : false;
                if ($rootVer && $rootVer !== $remote['package']->getVersion()) {
                    $packages['updates'][] = $remote;
                }
            } else {
                $packages['installs'][] = $remote;
                unset($jsonRequires[$packageName]);
            }
        }

        return $packages;
    }
797089
private function execute() {

		if(false === $this -> getExecuted()) {

			foreach($this -> rules as $rule) {

				$value = $this -> getValue($rule -> field, $rule -> prefix);

				//Execute custom extended validator
				if($rule -> closure) {

					if(false === call_user_func($rule -> closure, $rule -> field, $value)) {

						$this -> setPasses(false);

						$instance = $this -> getMessageInstance();
						$instance :: setFieldnames([$rule -> field]);
						$instance :: setError($rule -> prefix, $rule -> field, $rule -> message);
					}

					continue;
				}

				//Execute build in validator
				$class = $this -> getRuleClass($rule -> rule);
				$class = new $class();

				//Set rule data
				$class -> setField($rule -> field);
				$class -> setValue($value);
				$class -> setPrefix($rule -> prefix);
				$class -> setParameters($rule -> parameters);
				$class -> setValidateAsArray($this -> isValidateArray($rule -> field));

				if(true === is_callable([$class, 'requestParameters'])) {
					
					$params = call_user_func_array([$class, 'requestParameters'], []);

					foreach($params as $param) {
						
						$value = $this -> getValue($param, $rule -> prefix);
						$class -> setValues($param, $value);
					}
				}

				//Check if rule passes
				if(false === $this -> isRequired($rule -> field, $value) && false === $class -> isValid()) {

					$this -> setPasses(false);
					$this -> setErrorMessage($rule, $class);

					foreach($this -> combine as $combine) {
						
						if($combine -> getName() === $rule -> field) {

							foreach($combine -> getFieldnames() as $fieldname) {

								$rule -> field = $fieldname;
								$this -> setErrorMessage($rule, $class);
							}

							break;
						}
					}
				}
			}

			$this -> setExecuted(true);
		}
	}
1073865
public function execute($request)
    {

        ArrayObject::ensureArrayObject($request->getModel());
        $this->gateway->execute($status = new GetHttpRequest());

        if (isset($status->request['operation']) === false) {
            $request->markNew();
            return;
        }

        if (isset($status->request['operation']['status'])) {
            $status = $status->request['operation']['status'];

            if (EcommpayBridgeInterface::STATUS_SUCCESS === $status) {
                $request->markCaptured();
                return;
            }

            if (EcommpayBridgeInterface::STATUS_DECLINE === $status) {
                $request->markFailed();
            }
        }
    }
528497
public function exec()
    {
        $http = $this->argument('http');
        //
        $process = Router::get($http);
        //
        $this->show($process);
    }
297495
public function execute()
    {
        // Get the parameters
        $params = $this->getParams();

        // Get the url
        $url = $this->getUrl($params);

        // Run it
        return $this->sendRequest($url, $params);
    }
790085
public function execute()
    {
        $request = $this->get('request');
        $router = $this->get('router');
        $response = $this->get('response');

        // Attempt to match the requested route with a registered route
        if ($router->matchRequest($request->route(), $request->httpMethod())) {

            // A match was found - pass any route params to the Request instance
            $request->routeParams($router->params());

            // The closure associated with the matched route
            $closure = $router->getClosure($this);

            // Attempt to call the closure
            if ($closure) {
                // Call the output
                $closure($request, $response);
            } else {
                // There was a problem calling the route's closure
                $response->send(500, 'This route\'s callback is invalid.');
            }

        } else {

            // A route wasn't matched - return a 404
            $response->send(404, 'The requested resource was not found.');
        }
    }
687644
public function exec()
    {
        $http = $this->argument('http');
        $controller = $this->argument('controller');
        $method = $this->argument('method');
        //
        $process = Router::target($http, $controller, $method);
        //
        $this->show($process);
    }
345558
protected function execute(
        \Symfony\Component\Console\Input\InputInterface $input,
        \Symfony\Component\Console\Output\OutputInterface $output
    ) {
        /* bind $output context to log-methods. */
        $this->setOut($output);
        $this->logInfo("Command '" . $this->getName() . "' is started.");
        try {
            $req = new ARequest();
            $this->servClean->exec($req);
        } catch (\Throwable $e) {
            $this->logError("Command '" . $this->getName() . "' failed. Reason: " . $e->getMessage());
        }
        $this->logInfo("Command '" . $this->getName() . "' is completed.");

    }
145107
public static function execute( $sql, $parameters = null, $connection = null, $fetchMode = \PDO::FETCH_ASSOC )
    {
        self::$_statement = self::createStatement( $sql, $connection, $fetchMode );

        if ( empty( $parameters ) )
        {
            return self::$_statement->execute();
        }

        return self::$_statement->execute( $parameters );
    }
1099528
public function execute()
    {
        // Execute the before execution event
        $this->runtimeManager->executeEvent('\\Zepi\\Turbo\\Event\\BeforeExecution');
        
        // Get the event name for the request and execute the event
        $eventName = $this->routeManager->getEventNameForRoute($this->request);
        $eventName = $this->runtimeManager->executeFilter('\\Zepi\\Turbo\\Filter\\VerifyEventName', $eventName);

        if ($eventName !== false && $eventName != '') {
            $this->runtimeManager->executeEvent($eventName);
        } else {
            $this->runtimeManager->executeEvent('\\Zepi\\Turbo\\Event\\RouteNotFound');
        }
        
        // Execute the after execution event
        $this->runtimeManager->executeEvent('\\Zepi\\Turbo\\Event\\AfterExecution');

        // Finalize the output
        $this->runtimeManager->executeEvent('\\Zepi\\Turbo\\Event\\FinalizeOutput');
        
        // Execute the before output event
        $this->runtimeManager->executeEvent('\\Zepi\\Turbo\\Event\\BeforeOutput');
        
        // Print the output
        echo $this->response->getOutput();
        
        // Execute the after output event
        $this->runtimeManager->executeEvent('\\Zepi\\Turbo\\Event\\AfterOutput');
    }
589397
public function execute($query) {
		$query = $query->compile();
		return $this->driver->query($query->sql(), $query->params());
	}
64839
public function execute()
    {
        $aClientConfig   = [
            'base_uri'        => $this->sBaseUri,
            'verify'          => !(Environment::is(Environment::ENV_DEV) || Environment::is(Environment::ENV_TEST)),
            'allow_redirects' => Environment::not(Environment::ENV_TEST),
            'http_errors'     => Environment::not(Environment::ENV_TEST),
        ];
        $aRequestOptions = [
            'headers' => $this->aHeaders,
        ];

        $this->compile($aClientConfig, $aRequestOptions);

        $oClient = Factory::factory('HttpClient', '', $aClientConfig);

        return Factory::factory(
            'HttpResponse',
            '',
            $oClient->request(static::HTTP_METHOD, $this->sPath, $aRequestOptions)
        );
    }
1304382
public function execute()
    {
        $pipeline = array_reduce(
            array_reverse($this->pipes), $this->carry(), function ($passable) {
            return $passable;
        }
        );

        return $pipeline($this->passable);
    }
1358632
public function execute(): void
    {
        $path = '';
        
        try {
            $path = $this->getPath();
            
            if ($this->config->cache) {
                try {
                    $this->setCache();
                } catch (StorageNotSupportedException $e) {
                    $this->cache = null;
                } catch (StorageConnectException $e) {
                    $this->cache = null;
                }
            }
            
            if (null !== $this->cache 
            && !$this->cache->expired($path, $this->config->cacheTtlWholePage)) {
                $result = $this->getCacheResult($this->cache->get($path, ''));
            } else {
                $result = $this->compose($this->parse($path));
            }
            
        } catch (BadPathException $e) {
            $result = $this->getError(500, 'Bad path');
            
        } catch (RouteStorageNotSetException $e) {
            $result = $this->getError(500, 'Route storage not set');
            
        } catch (RouteStorageEmptyException $e) {
            $result = $this->getError(500, 'Route storage empty');
            
        } catch (DbConnectException $e) {
            if (null !== $this->cache && $this->cache->has($path)) {
                // @codeCoverageIgnoreStart
                // passed in local tests, but skipped in travis
                $result = $this->getCacheResult($this->cache->get($path, ''));
                // @codeCoverageIgnoreEnd
            } else {
                $result = $this->getError(500, 'DataBase connection error');
            }
            
        } catch (SectionNotExistsException $e) {
            $result = $this->getError(404, 'Section not exists');
            
        } catch (SectionDisabledException $e) {
            $result = $this->getError(403, 'Section disabled');
            
        } catch (ModuleDisabledException $e) {
            $result = $this->getError(403, 'Section module disabled');
            
        } catch (ModuleParameterConflictException $e) {
            $result = $this->getError(404, 'Module parameter conflict with another');
            
        } catch (ModuleParameterFormatException $e) {
            $result = $this->getError(404, 'Module parameter bad format');
            
        } catch (ModuleParameterUnknownException $e) {
            $result = $this->getError(404, 'Module parameter unknown');
            
        } catch (\Throwable $e) {
            $result = $this->getError(500, 'Unexpected exception: ' . $e->getMessage());
            
        }
        
        $this->sendHeaders($result->getHeaders());
        
        $this->render($result->getView());
    }
321251
public function execute()
    {
        $request       = $this->_request;
        $iTotalRecords = $this->_queryBuilder->getTotalRecords();
        list($data, $objects) = $this->_queryBuilder->getData();
        $id_index      = array_search('_identifier_', array_keys($this->getFields()));
        $ids           = array();
        array_walk($data, function($val, $key) use ($id_index, &$ids) {
            $ids[$key] = $val[$id_index];
        });
        if (!is_null($this->_fixed_data))
        {
            $this->_fixed_data = array_reverse($this->_fixed_data);
            foreach ($this->_fixed_data as $item)
            {
                array_unshift($data, $item);
            }
        }
        if (!is_null($this->_renderer))
        {
            array_walk($data, $this->_renderer);
        }
        if (!is_null($this->_renderer_obj))
        {
            $this->_renderer_obj->applyTo($data, $objects);
        }
        if (!empty($this->_multiple))
        {
            array_walk($data, function($val, $key) use(&$data, $ids) {
                array_unshift($val, "<input type='checkbox' name='dataTables[actions][]' value='{$ids[$key]}' />");
                $data[$key] = $val;
            });
        }
        $output = array(
            "sEcho"                => intval($request->get('sEcho')),
            "iTotalRecords"        => $iTotalRecords,
            "iTotalDisplayRecords" => $iTotalRecords,
            "aaData"               => $data
        );
        return new JsonResponse($output);
    }
122678
public function execute(IO $io, Config\Action $action, Config\Options $arguments) : void
    {
        $processor = new Processor();
        $result    = $processor->run($this->formatCommand($action->getAction(), $arguments->getAll()));

        if (!$result->isSuccessful()) {
            throw new Exception\ActionFailed($result->getStdOut() . PHP_EOL . $result->getStdErr());
        }
        $io->write(empty($result->getStdOut()) ? '<info>OK</info>' : $result->getStdOut());
    }