(non-PHPdoc).

@see \Zend\Json\Server\Server::_handle()
183971
protected function handleRequest()
    {
        try {
            $request = $this->getRequest();
            if ($request->isParseError() === true) {
                throw new ParseErrorException();
            }
            $this->events->trigger('sendRequest.pre', $this, array('methode' => $request->getMethod()));
            if (($ret = $this->getParentHandle()) instanceof RPCERROR && ($ret = $ret->getData()) instanceof \Exception) {
                throw $ret;
            }
        } catch (AbstractException $e) {
            if(isset($this->options['log'])) {
                $this->container->get($this->options['log'])->err('(' . $e->getCode() . ') ' . $e->getMessage());
            }
            return $this->fault($e->getMessage(), $e->getCode());
        } catch (\Exception $e) {
            if(isset($this->options['log'])) {
                $this->container->get($this->options['log'])->err('(' . $e->getCode() . ') ' . $e->getMessage() . ' in ' . $e->getFile() . ' line ' . $e->getLine(), $e->getTrace());
            }
            return ((isset($this->options['environment']) && $this->options['environment'] === "dev")) ? $this->fault('(' . $e->getCode() . ') ' . $e->getMessage() . ' in ' . $e->getFile() . ' line ' . $e->getLine(), $e->getCode(), $e->getTrace()) : $this->fault('Internal error', RPCERROR::ERROR_INTERNAL);
        }
    }
1328179
public function handle()
    {
        $group = $this->argument('group');
        $json = $this->option('json');

        if (is_null($group) && !$json) {
            $this->warn('You must either specify a group argument or export as --json');

            return;
        }

        if (!is_null($group) && $json) {
            $this->warn('You cannot use both group argument and --json option at the same time');

            return;
        }

        $this->manager->exportTranslations($group, $json);

        if (!is_null($group)) {
            $this->info('Done writing language files for '.(($group == '*') ? 'ALL groups' : $group.' group'));
        } elseif ($json) {
            $this->info('Done writing JSON language files for translation strings');
        }
    }
157989
public function handle()
    {

        if (! $this->preflighted()) return;

        $prices = $this->retrieve();

        if ($prices->isCachedLoad()) return;

        collect($prices)->chunk(1000)->each(function ($chunk) {

            $records = $chunk->map(function ($item, $key) {

                return [
                    'type_id'        => $item->type_id,
                    'average_price'  => $item->average_price ?? 0.0,
                    'adjusted_price' => $item->adjusted_price ?? 0.0,
                    'created_at'     => carbon(),
                    'updated_at'     => carbon(),
                ];
            });

            Price::upsert($records->toArray(), [
                'type_id',
                'average_price',
                'adjusted_price',
                'updated_at',
            ]);
        });
    }
951953
public function handle()
    {
        $exception = $this->getException();

        Log::logger('ErrorHandler')->error($exception->getMessage(), [
            'exception' => get_class($exception),
            'file' => sprintf(
                "%s on line %d",
                $exception->getFile(),
                $exception->getLine()
            )
        ]);

        $template = new Template();

        $template = $template->initialize();
        $view = 'errors/500.html.twig';
        $code = 500;
        if (
            ($exception instanceof ControllerNotFoundException) ||
            ($exception instanceof ActionNotFoundException)
        ) {
            $view = 'errors/404.html.twig';
            $code = 404;
        }

        $data = ['exception' => $exception];
        $html = $template->parse($view)
            ->process($data);

        $this->app->response->setStatusCode($code)
            ->setContent($html);

        $this->app->response->send();
    }
757931
public function handle()
    {
        $name = $this->argument('module');

        if ($name) {
            $this->updateModule($name);

            return;
        }

        /** @var \Nwidart\Modules\Module $module */
        foreach ($this->laravel['modules']->getOrdered() as $module) {
            $this->updateModule($module->getName());
        }
    }
1270521
public function handle()
    {
        // Transform array.
        foreach (view()->getFinder()->getHints() as $key => $value) {
            $this->hints[] = [$key, $value[0]];
        }

        $this->table($this->headers, $this->hints);
    }
1190489
public function handle()
    {
        /** @var RestHandler $service */
        $service = ServiceManager::getService($this->service);
        /** @var \DreamFactory\Core\Contracts\ServiceResponseInterface $rs */
        $rs = ServiceManager::handleRequest(
            $service->getName(),
            Verbs::POST, '_table/' . $this->table,
            [],
            [],
            ResourcesWrapper::wrapResources($this->records),
            null,
            false
        );
        if (in_array($rs->getStatusCode(), [HttpStatusCodes::HTTP_OK, HttpStatusCodes::HTTP_CREATED])) {
            //$data = [];
        } else {
            $content = $rs->getContent();
            Log::error('Failed to insert data into table: ' .
                (is_array($content) ? print_r($content, true) : $content));
            throw new InternalServerErrorException('Failed to insert data into table. See log for details.');
        }
    }
1102076
public function handle()
    {
        // get information about the REST-request
        $this->get();

        if ($this->requestMethod === 'GET' && $this->typo3Cache->hasCacheEntry($this->url, $_GET)) {
            return $this->handleRequestByTypo3Cache();
        }

        // if no cache exist: restler should handle the request
        return parent::handle();
    }
711546
public function __HANDLER()
    {
        // Create query to get users
        $query = dbQuery('user')->Active(1)->order_by('UserID');

        // Create generic table for users
        $table = new Table($query);

        // Установим представление
        m()->view('main/index')->title(t('Пользователи системы', true))
            ->all_materials(true)
            // Установим шаблон таблицы пользователей
            ->user_table($table->render());
    }
1038
protected function _handle()
    {
        list($finder, $options) = $this->_extractFinder();
        $query = $this->_table()->find($finder, $options);
        $subject = $this->_subject(['success' => true, 'query' => $query]);

        $this->_trigger('beforePaginate', $subject);
        $items = $this->_controller()->paginate($subject->query);
        $subject->set(['entities' => $items]);

        $this->_trigger('afterPaginate', $subject);
        $this->_trigger('beforeRender', $subject);
    }
936570
public function handle(Request $request, JsonRpcServer $server)
    {
        if (array_key_exists('smd', $request->all())) {
            $server->setResponse((new SmdGenerator($server))->get()->toArray());

            return false;
        }

        return true;
    }
246236
protected function _handle()
    {
        $request = $this->_request();
        $this->_configIndex($this->_table(), $request);
        $query = $this->_table()->find();
        $repository = $query->repository();

        $query->searchOptions(['ignore_unavailable' => true]);

        if ($request->query('type')) {
            $repository->name($request->query('type'));
        }

        if ($request->query('primary_key')) {
            $query->where(['primary_key' => $request->query('primary_key')]);
        }

        if ($request->query('transaction')) {
            $query->where(['transaction' => $request->query('transaction')]);
        }

        if ($request->query('user')) {
            $query->where(['meta.user' => $request->query('user')]);
        }

        if ($request->query('changed_fields')) {
            $query->where(function ($builder) use ($request) {
                $fields = explode(',', $request->query('changed_fields'));
                $fields = array_map(function ($f) { return 'changed.' . $f; }, array_map('trim', $fields));
                $fields = array_map([$builder, 'exists'], $fields);
                return $builder->and_($fields);
            });
        }

        if ($request->query('query')) {
            $query->where(function ($builder) use ($request) {
                return $builder->query(new \Elastica\Query\QueryString($request->query('query')));
            });
        }

        try {
            $this->addTimeConstraints($request, $query);
        } catch (\Exception $e) {
        }

        $subject = $this->_subject(['success' => true, 'query' => $query]);
        $this->_trigger('beforePaginate', $subject);

        $items = $this->_controller()->paginate($subject->query);
        $subject->set(['entities' => $items]);

        $this->_trigger('afterPaginate', $subject);
        $this->_trigger('beforeRender', $subject);
    }
922790
public function handle()
    {
        $port  = $this->input->getOption('port');

        if($port) {
            $this->info("Planet Framework built-in server started on http://localhost:{$port}");
            exec("php -S localhost:{$port} -t public");
        }

        $this->info("Planet Framework built-in server started on http://localhost:8000");
        exec("php -S localhost:8000 -t public");

    }
720527
def handle(self, message, _server=None, _request=None):
        
        if not message:
            return

        if message[-1] == 0:
            message = message[:-1]

        string = message.decode('utf-8')
        handle = self._handle(json.loads(string), message, _server, _request)
        for out in handle:
            if out == None:
                return
            try:
                yield json.dumps(out, cls=VarlinkEncoder).encode('utf-8')
            except ConnectionError as e:
                try:
                    handle.throw(e)
                except StopIteration:
                    pass
72664
public function handle()
    {
        Log::notice('Queued Script handled for ' . $this->script_id);
        if ($script = $this->getEventScript($this->script_id)) {
            $session = json_decode(Crypt::decrypt($this->session), true);
            Session::replace($session);

            $data = json_decode(Crypt::decrypt($this->event), true);
            if (null !== $this->handleScript($script->name, $script->content, $script->type, $script->config, $data)) {
                Log::notice('Queued Script success for ' . $this->script_id);
            }
        }
    }
324573
public function handle()
	{
		// Get Var Elements
		$accessToken = $this->getAccessToken();

		$state = $this->getVar("state");
		
		// Initiate OAuth Client with Specific server configuration
		$to = new $this->_className();

		// Try to Handle the Authentication Process
		if ($accessToken == "")
		{
			$code = $this->_context->get("code");
			
			// If not received the "Code" Parameter, initiate the autorization request
			if ($code == "")
			{
				$state = md5(uniqid(rand(), TRUE)); //CSRF protection
				$this->setVar("state", $state);
				
				$params = array(
					"client_id" => $this->_client_id,
					"redirect_uri" => $this->_redirect_uri,
					"state" => $state,
					"scope" => $this->_scope
				);

				if (count($this->_extraArgs) > 0)
				{
					$params = array_merge($params, $this->_extraArgs);
				}
				
				$req = new WebRequest($to->authorizationURL());
				$req->redirect($params, $this->_window_top);
			}
			
			// Request the Access Token
			if ($this->_context->get("state") == $this->getVar("state"))
			{
				$params = array(
					"client_id" => $this->_client_id,
					"redirect_uri" => $this->_redirect_uri,
					"client_secret" => $this->_client_secret,
					"code" => $code,
					"grant_type" => "authorization_code"
				);
				
				$req = new WebRequest($to->accessTokenURL());
				$result = $req->post($params);

				$accessToken = $to->decodeAccessToken($result);
				
				$this->setVar("access_token", $accessToken);
				$to->setAccessToken($accessToken);
				
				$this->saveAccessToken();
				
				if ($this->_app_uri != "")
				{
					$req = new WebRequest($this->_app_uri);
					$response = $req->redirect();
				}
			}
		}
		else 
		{
			$to->setAccessToken($this->getVar('access_token'));
		}
		
		return $to;
		
	}
184603
public function handle()
    {

        if (! $this->preflighted()) return;

        $event_ids = CharacterCalendarEvent::where('character_id', $this->getCharacterId())
            ->whereNotIn('event_id', function ($query) {

                $query->select('event_id')
                    ->from('character_calendar_event_details');

            })->pluck('event_id');

        $event_ids->each(function ($event_id) {

            try {
                $detail = $this->retrieve([
                    'character_id' => $this->getCharacterId(),
                    'event_id' => $event_id,
                ]);

                if ($detail->isCachedLoad()) return;

                CharacterCalendarEventDetail::firstOrCreate([
                    'event_id' => $event_id,
                ], [
                    'owner_id' => $detail->owner_id,
                    'owner_name' => $detail->owner_name,
                    'duration' => $detail->duration,
                    'text' => $detail->text,
                    'owner_type' => $detail->owner_type,
                ]);
            } catch (RequestFailedException $e) {
                if (strtolower($e->getError()) == 'event not found!') {
                    CharacterCalendarEvent::where('character_id', $this->getCharacterId())
                                          ->where('event_id', $event_id)
                                          ->delete();

                    return;
                }

                throw $e;
            }
        });
    }