Run the application and send the response.

@return  void
7149
public function run()
	{
		// Start handling errors before doing anything else
		if ($this->has('error'))
		{
			array_walk($this->serviceProviders, function($p)
			{
				if (method_exists($p, 'startHandling'))
				{
					return $p->startHandling();
				}
			});
		}

		// Boot the application
		//
		// This allows service providers to finish performing any
		// needed setup.
		$this->boot();

		// Initialise
		if (!$this->runningInConsole() && $this->has('dispatcher'))
		{
			$this['dispatcher']->trigger('system.onAfterInitialise');

			if ($this->has('profiler') && $this->get('profiler'))
			{
				$this['profiler']->mark('afterInitialise');
			}
		}

		// Create a new stack and bind to application then
		$this['stack'] = new Stack($this);

		// Send request throught stack and finally send response
		$this['stack']
			->send($this['request'])
			->through($this->middleware($this->serviceProviders))
			->then(function($request, $response)
			{
				$response->prepare($request);
				$response->send();
			});
	}
823803
public function run() {
        // Setup connection
        $resource = curl_init();

        // Set cURL options
        foreach ($this->settings as $option => $setting) {
            curl_setopt($resource, $option, $setting);
        }

        // Process headers
        $headers = [];
        foreach ($this->headers as $key => $value) {
            if (!empty($value)) {
                $headers[] = implode(' : ', [$key, $value]);
            }
            else {
                $this->headers[] = $key;
            }
        }

        // Add the headers
        curl_setopt($resource, CURLOPT_HTTPHEADER, $headers);

        // Execute cURL
        $response = curl_exec($resource);

        // Get the size of the header
        $header_size = curl_getinfo($resource, CURLINFO_HEADER_SIZE);

        // Get the header from the result
        $headers = substr($response, 0, $header_size);

        // Get the body from the result
        $body = substr($response, $header_size);

        // Get the HTTP response code from the result
        $responseCode = curl_getinfo($resource, CURLINFO_HTTP_CODE);

        // Close the connection
        curl_close($resource);

        // Create Result instance
        $this->result = new Result($body, $responseCode, $headers);

        return $this->result;
    }
907855
public function run()
    {
        try {
            $response = $this->buildResponse();
        } catch (Error\Base $ex) {
            $response = $this->handleError($ex);
        }

        $this->serializer->serialize($response, $this);

        return $this;
    }
781583
final public function run()
    {
        try {
            $response = $this->execute();
            $statusCode = 0;
            if ($response instanceof
                \WebServCo\Framework\Interfaces\ResponseInterface) {
                $statusCode = $response->send();
            }
            $this->shutdown(null, true, Framework::isCli() ? $statusCode : 0);
        } catch (\Throwable $e) { // php7
            $this->shutdown($e, true);
        } catch (\Exception $e) { // php5
            $this->shutdown($e, true);
        }
    }
1120954
public function run()
    {
        if ('cli' === php_sapi_name()) {
            // do run console application

            $input = new ArgvInput();
            $env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
            $debug = '0' !== getenv('SYMFONY_DEBUG') && !$input->hasParameterOption(['--no-debug', '']) && 'prod' !== $env;

            if ($debug || $this->debug) {
                Debug::enable();
            }

            $application = new Application($this->getKernel());
            $application->run($input);
        } else {
            // do run web application
            $request = Request::createFromGlobals();

            $kernel = $this->getKernel();

            if (!$this->debug) {
                $kernel->loadClassCache();
            }

            if ($this->cacheClass && class_exists($this->cacheClass)) {
                // add (or uncomment) this new line!
                // wrap the default AppKernel with the AppCache one
                $cacheClass = $this->cacheClass;
                $kernel = new $cacheClass($kernel);
            }

            // actually execute the kernel, which turns the request into a response
            // by dispatching events, calling a controller, and returning the response
            $response = $kernel->handle($request);

            // send the headers and echo the content
            $response->send();

            // triggers the kernel.terminate event
            $kernel->terminate($request, $response);
        }
    }
560890
public function run()
    {
        $this->signal->send($this, 'beginRequest', $this);
        register_shutdown_function([$this, 'end'], 0, false);
        $this->processRequest();
        $this->signal->send($this, 'endRequest', $this);
    }
480169
public function run()
    {
        $this->init();

        // Loop forever, except when a maximum number of requests is configured
        $requestsHandled = 0;
        while ($this->maxRequests === null || $requestsHandled < $this->maxRequests) {
            $this->doStep();
            $requestsHandled++;
        }
    }
190429
public function run()
    {
        $this->log("Server listening on {$this->host}:{$this->port}");
        $this->socket->listen($this->port, $this->host);
        $this->loop->run();
    }
1250528
public function run()
    {
        $resolvedRequest = $this->router->route($this->request);
        echo $this->dispatcher->dispatch($resolvedRequest);
    }
1121379
public function run()
    {
        if (!(bool)$this->ready) {
            $this->init();
        }

        $this->configureCustomPostType();
        $this->addAppRoutes();
        $this->improveSecurity();

        $this->displayRuntimeHeader();
        $this->loadMiddleware();
    }
354281
public function run()
    {
        if ($data = BotApi::jsonValidate($this->getRawBody(), true)) {
            $this->handle([Update::fromResponse($data)]);
        }
    }
1000142
public function run()
    {
        // Define a custom error handler so we can log PHP errors
        set_error_handler([\Kotori\Core\Handle::class, 'error']);
        set_exception_handler([\Kotori\Core\Handle::class, 'exception']);
        register_shutdown_function([\Kotori\Core\Handle::class, 'end']);

        Container::get('config')->initialize($this->config);
        Middleware::register('before_app');

        ini_set('date.timezone', Container::get('config')->get('time_zone'));

        // Load application's common functions
        Helper::import(Container::get('config')->get('app_full_path') . '/common.php');

        // @codingStandardsIgnoreStart
        if (function_exists('spl_autoload_register')) {
            spl_autoload_register(['\\Kotori\\Core\\Helper', 'autoload']);
        } else {
            function __autoload($className)
            {
                Helper::autoload($className);
            }
        }
        // @codingStandardsIgnoreEnd

        // Init session
        Container::get('request')->sessionInit();

        Middleware::register('after_app');
        // Load route class
        Container::get('route')->dispatch();
    }
129400
protected function run()
    {
        $slug = $this->get('slug');

        $category = $this->categories->findBySlug($slug);

        $creator = User::current();
        $now = Carbon::now();

        $conversation = (object) [
            'poster'        => $creator->username,
            'title'         => $this->get('subject'),
            'posted'        => $now,
            'last_post'     => $now,
            'last_poster'   => $creator->username,
            'category_slug' => $category->slug,
        ];

        $post = (new Post([
            'poster'	=> $creator->username,
            'poster_id'	=> $creator->id,
            'message'	=> $this->get('message'),
            'posted'	=> $now,
        ]));

        $this->categories->addNewTopic($category, $conversation, $post->toArray());

        $this->raise(new UserHasPosted($creator, $post));
    }
551299
public function run()
    {
        $this->getLastActionDates();
        $this->getInfoUsers();

        return Response::data([
            'count' => $this->info_users_count,
            'items' => $this->info_users_items,
        ]);
    }
1312579
public function run()
	{
		$this->resolveView($this->getRequestedView());
		$controller=$this->getController();
		if($this->layout!==null)
		{
			$layout=$controller->layout;
			$controller->layout=$this->layout;
		}

		$this->onBeforeRender($event=new CEvent($this));
		if(!$event->handled)
		{
			if($this->renderAsText)
			{
				$text=file_get_contents($controller->getViewFile($this->view));
				$controller->renderText($text);
			}
			else
				$controller->render($this->view);
			$this->onAfterRender(new CEvent($this));
		}

		if($this->layout!==null)
			$controller->layout=$layout;
	}
610061
public function run()
    {
        $this->command('PASS', $this->connection->getPassword());
        $this->command('NICK', $this->connection->getNickname());

        $this->grantAll();

        $this->setLogIn();
        $this->dispatch('tweech.authenticated', new Event());

        $ticker = new Ticker($this);
        $ticker->run();

        $chatreader = new ChatReader($this);
        $chatreader->handleSockets();
        $chatreader->run();
    }
446674
public function run()
	{
		$request = Request::createFromGlobals();
		$this->instance('request', $request);

		$this->bootProviders();

		$response = $this['router']->dispatch($this['request']);

		if (false == ($response instanceof Response)) {
			$response = new Response($response);
		}

		$response->send();
	}