@param \Illuminate\Http\Request $request

@return mixed
@throws \Exception
169683
public function getSearchCharactersData(Request $request)
    {

        $characters = $this->doSearchCharacters();

        return DataTables::of($characters)
            ->editColumn('name', function ($row) {

                $character = CharacterInfo::find($row->character_id);

                return view('web::partials.character', compact('character'));
            })
            ->editColumn('corporation_id', function ($row) {

                $corporation = CorporationInfo::find($row->corporation_id);

                return view('web::partials.corporation', compact('corporation'));
            })
            ->rawColumns(['name', 'corporation_id'])
            ->make(true);

    }
11158
protected function send(Request $request)
    {
        try {
            $response = $this->client->send($request);
        } catch (ClientException $e) {
            $response = $e->getResponse();
        } catch (ServerException $e) {
            $response = $e->getResponse();
        }

        return $response;
    }
1279098
public function sendRequest(Request $request)
    {
        $response = $this->httpClient->send($request);

        $this->checkErrorResponse($response);

        return $response;
    }
205789
public function send(Request $request)
    {
        $response = $this->adapter->send($request);

        return $response->getBody()->getContents();
    }
281913
public function run(Request $request) {
		$prefs = $this->getServiceContainer()->getPreferenceLoader()->getSystemPreferences();
		$translator = $this->getServiceContainer()->getTranslator();
		$reg = $this->getServiceContainer()->getExtensionRegistry();
		$settings = $reg->getExtensions(AccountModule::EXT_SETTINGS);
		$section = $this->getParam('section');
		$routes = [];

		// build settings routes
		foreach ($settings as $ext) {
			$routes[$translator->trans($ext['slug'])] = $ext;
		}
			
		if (!isset($routes[$section])) {
			$url = $prefs->getAccountUrl() . $translator->trans('slug.settings');
			throw new ResourceNotFoundException(sprintf('No route found for %s/%s', $url, $section));
		}
			
		$ext = $routes[$section];
		$kernel = $this->getServiceContainer()->getKernel();
		$module = $this->getServiceContainer()->getModuleManager()->load($ext['module']);
		$action = $module->loadAction($ext['action'], 'html');
		$response = $kernel->handle($action, $request);
		
		if ($response instanceof RedirectResponse) {
			return $response;
		}
		
		return $this->responder->run($request, new Blank([
			'settings' => $settings, 
			'section' => $response->getContent()
		]));
	}
1257529
public function dispatch(Request $request)
    {
        // determine resource
        $resourceParts = explode('/', $request->getResource());
        $resourceName = $resourceParts[0];
        $subResourceName = false;
        if (count($resourceParts) > 1) {
            $subResourceName = $resourceParts[1];
        }

        try {
            $resourceMetadata = $this->resourceMetadataFactory->getMetadataByResourceName($resourceName);
        } catch (ResourceMappingException $e) {
            throw Exception::resourceNotFound($resourceName, 404, $e);
        }

        // determine service
        if ($subResourceName) {
            if (!$resourceMetadata->hasSubResource($subResourceName)) {
                throw Exception::resourceNotFound($request->getResource());
            }

            $subResourceMapping = $resourceMetadata->getSubResource($subResourceName);
            $service = $this->serviceLocator->get($subResourceMapping['service']);
        } else {
            $service = $this->serviceLocator->get($resourceMetadata->getService());
        }

        $this->registerListeners($service);

        $event = new RequestEvent();
        $event->setRequest($request);

        $this->eventManager->dispatch($request->getMethod(), $event);

        return $event->getData();
    }
520501
public function dispatch(Request $request)
    {
        $this->currentRequest = $request;
        
        if (is_null($response)) {
            $response = $this->dispatchToRoute($request);
        }
        
        return $this->prepareResponse($request, $response);
    }
879395
private function getConsumer($request)
    {
        $consumer_key = $request instanceof Request
            ? $request->getParameter("oauth_consumer_key")
            : null;

        if (!$consumer_key) {
            throw new Exception("Invalid consumer key");
        }

        $consumer = $this->data_store->lookupConsumer($consumer_key);
        if (!$consumer) {
            throw new Exception("Invalid consumer");
        }

        return $consumer;
    }
61552
public function getController(Request $request)
    {
        $controller = $request->attributes->get('controller');

        if($request->attributes->has('_sub_request') && $request->attributes->get('_sub_request'))
        {
            $controller = $request->attributes->get('_controller');
        }

        if (!$controller)
        {
            if (null !== $this->logger)
            {
                $this->logger->warning('Unable to look for the controller as the "_controller" parameter is missing');
            }

            return false;
        }

        if(is_array($controller))
        {
            return $controller;
        }

        if(is_object($controller))
        {
            if (method_exists($controller, '__invoke'))
            {
                return $controller;
            }

            throw new \InvalidArgumentException(sprintf('Controller "%s" for URI "%s" is not callable.', get_class($controller), $request->getPathInfo()));
        }

        $prepare = $this->prepare($request->attributes->all());

        $request->attributes->set('_bundle', $prepare['bundle']);
        $request->attributes->set('_controller', strtolower($prepare['parts'][1]));
        $request->attributes->set('_action', strtolower($prepare['parts'][2]));

        $callable = array($this->instantiateController($prepare['controller']), $prepare['action']);

        $request->attributes->set('_callable', $callable);

        if (!is_callable($callable))
        {
            throw new \InvalidArgumentException(sprintf('Controller "%s" for URI "%s" is not callable.', $controller, $request->getPathInfo()));
        }

        return $callable;
    }
1320463
public function handle(Request $request)
	{
		$response = $this->next($request);

		try
		{
			$this->app->get('arguments')->parse();
		}
		catch (UnsupportedCommandException $e)
		{
			$this->app->get('output')->error($e->getMessage());
		}
		catch (UnsupportedTaskException $e)
		{
			$this->app->get('output')->error($e->getMessage());
		}

		return $response;
	}
1118493
public function get(Request $request)
    {
        $userEntity = $request->attributes->get('user');

        if ($userEntity === null) {
            $userEntity = $this->getUser();
        } elseif ($userEntity === false) {
            return $this->createNotFoundResponse();
        }

        return $this->userArrayWithoutPassword($userEntity);
    }
1020300
public function resolve(Request $request)
    {
        $attributes = $this->urlMatcher->match($request->getPathInfo());
        $controllerNotation = explode('@', $attributes['_route']);
        unset($attributes['_route']);

        $controller = explode(':', $controllerNotation[0]);

        $total = count($controller);
        $last = $total - 1;

        $controller[$total] = sprintf('%sController', $controller[$last]);
        $controller[$last] = 'Controller';

        $action = sprintf('%sAction', $controllerNotation[1]);
        unset($controllerNotation);

        $class = implode('\\', $controller);
        if (!class_exists($class)) {
            throw new \InvalidArgumentException(sprintf('Class "%s" is not exist.', $class));
        }

        $implements = class_implements($class);
        if (!array_key_exists(ControllerInterface::class, $implements)) {
            throw new \InvalidArgumentException(sprintf('"%s" must implement "%s"', $class, ControllerInterface::class));
        }

        return array(
            '_controller' => $class,
            '_action' => $action,
            '_parameters' => $attributes,
        );
    }
1339907
protected function handleRequest(Request $request)
    {
        if ($this->isLaravel()) {
            return $this->getKernel()->handle($request);
        }

        return $this->getApplication()->dispatch($request);
    }
554921
public function execute($request)
	{
		$method = strtolower($request->getRequestMethod());
		if(!in_array($method,array('get','put','post','delete','head')))
		{
			throw new Exception("Unknown HTTP verb");
		}

		$this->setRouter($request->getRouter());

		return $this->$method($request);
	}
280165
public function get(Request $request)
    {
        $this->collect($request);

        return implode(PHP_EOL, $this->parts);
    }
823398
protected function processRaw(Request $request) {
		$resolver = $this->getResolver();
		$resolver->sortRoutes();

		$route = $resolver->getRoute($request);

		if($route) {
			$request->setRoute($route);
			$controllerClass = $route->getController();
			$action = $route->getAction();

			$controller = new $controllerClass();
			$controller->setFlash($this->flash);
			$controller->setResolver($this->resolver);
			$controller->setContainer($this->container);

			$this->prepareController($controller, $action, $request, $route);
		}
		else
			$controller = null;

		if($response = $this->hookManager->trigger('Asgard.Http.Start', [$request, $controller]))
			return $response;

		if($response = $this->executeStart($request, $controller))
			return $response;

		if($route === null)
			throw new Exception\NotFoundException;

		return $controller->run($action, $request);
	}
1299111
public function run( Request $request )
	{
		try
		{
			if ( !is_string( $this->action['uses'] ) )
				return $this->runCallable( $request );

			return $this->runController( $request );
		}
		catch ( HttpResponseException $e )
		{
			return $e->getResponse();
		}
	}