Run the CORS handle.

@return void

@author Seven Du <shiweidu@outlook.com>
185525
public function handle()
    {
        if (in_array(false, array_values($this->initialized))) {
            throw new CorsInitException('Not set "request" or "response"');
        }

        $this->response->setAccessControlAllowCredentials($this->getCredentials());
        $this->response->setAccessControlAllowOrigin($this->getOrigin());
        $this->response->setAccessControlAllowMethods($this->getMethods());
        $this->response->setAccessControlAllowHeaders($this->getAllowheaders());
        $this->response->setAccessControlExposeHeaders($this->getExposeHeaders());
        $this->response->setAccessControlMaxAge($this->getMaxAge());
        $this->response->setAddedStatus(true);
    }
570109
public function execute()
    {
        $txt = 'validator_email';
        $domain = '';
        
        $result = filter_var($this->value, FILTER_VALIDATE_EMAIL);
        
        if ($result) {
            
            list ($user, $domain) = explode("@", $this->value);
            
            // Perform dns check of mail domain
            if ($domain) {
                
                $result = checkdnsrr($domain, "MX");
                
                if (!$result) {
                    $txt = 'validator.rule.email.dnscheck';
                }
            }
        }
        
        if (!$result) {
            $this->msg = [
                $txt,
                [
                    $domain
                ]
            ];
        }
    }
355581
protected function run()
    {
        if (PHP_SAPI === 'cli') {
            return;
        }
        
        if ($this->ctrlRouterInfos->target === null) {
            return;
        }
        
        $this->module
            ->monolog
            ->getLogger()
            ->debug(
                'Execute current route.',
                ['target' => $this->ctrlRouterInfos->target]
            );
        
        $useClass = $this->config->getValue('useClass');
        
        if ($useClass === true) {
            $this->runObject();
        } else {
            $this->runProcedural();
        }
    }
1283323
public static function run()
    {
        if (!pass('validate_request', 'route/' . self::$_base)) {
            return;
        };

        if (self::$_base !== null  &&  !pass('route/' . self::$_base, self::$_PATH)) {
            trigger('http_status', 500);
        };
    }
314217
public function run()
    {
        $this->loader->parse();
        $files = $this->filesystem->getFiles();

        // Now we check all the files against the config
        while ($files->valid()) {
            /* @var SplFileInfo $file */
            $file = $files->current();

            // Skip symlinks as they are always 0777
            if ($file->isLink()) {
                $files->next();
                continue;
            }

            $filename = $this->getRelativeFilename($file);

            // Skip excluded files, of course.
            if ($this->isExcluded($filename)) {
                $files->next();
                continue;
            }

            $fileShouldBeExecutable = $this->shouldBeExecutable($filename);
            if (!$fileShouldBeExecutable && $file->isExecutable()) {
                $this->messageBag->addMessage($file->getPathname(), 'minx');
                $files->next();
                continue;
            }

            if ($fileShouldBeExecutable && !$file->isExecutable()) {
                $this->messageBag->addMessage($file->getPathname(), 'plusx');
                $files->next();
                continue;
            }

            $files->next();
        }
    }
1204713
public function run()
    {
        // Respond after a successful OAuth2 redirect.
        if (isset($_GET['state'], $_GET['code'])) {
            if ($_GET['state'] !== $this->state) {
                $this->reportError('Invalid state parameter');
                return;
            }
            if (!file_put_contents($this->file, $_GET['code'], LOCK_EX)) {
                $this->reportError('Failed to write authorization code to file');
                return;
            }
            $this->setRedirect($this->localUrl . '/?done');
            $this->response->content = '<p>Authentication response received, please wait...</p>';

            return;
        }

        // Show the final result page.
        if (array_key_exists('done', $_GET)) {
            $this->response->content = '<p><strong>Successfully logged in.</strong></p>'
                . '<p>You can return to the command line.</p>';

            return;
        }

        // Redirect to login.
        $url = $this->getOAuthUrl();
        $this->setRedirect($url);
        $this->response->content = '<p><a href="' . htmlspecialchars($url) .'">Log in</a>.</p>';
        return;
    }
614586
public function run()
    {
        $content = ob_get_clean();
        echo Html::tag('span', '', ['id' => $this->id]);
        echo Html::tag('span', $content, ['id' => $this->id . '-content']);

        if (Yii::$app->has('frontendState')) {
            Yii::$app->frontendState->set('form.' . $this->id . '.values', $this->initialValues);
        } else {
            $state = [
                'form' => [
                    $this->id => [
                        'values' => $this->initialValues,
                    ],
                ],
            ];
            \Yii::$app->view->registerJs('window.APP_REDUX_PRELOAD_STATES = [];', View::POS_HEAD);
            \Yii::$app->view->registerJs('window.APP_REDUX_PRELOAD_STATES.push(' . Json::encode($state) . ')', View::POS_HEAD, $this->id . '-state');
        }
    }
706649
public function run()
	{
		$context = $this->getContext();
		$queue = $context->getMessageQueue( 'mq-email', 'customer/email/account' );
		$custManager = \Aimeos\MShop::create( $context, 'customer' );

		while( ( $msg = $queue->get() ) !== null )
		{
			try
			{
				if( ( $list = json_decode( $msg->getBody(), true ) ) === null )
				{
					$str = sprintf( 'Invalid JSON encode message: %1$s', $msg->getBody() );
					throw new \Aimeos\Controller\Jobs\Exception( $str );
				}

				$password = ( isset( $list['customer.password'] ) ? $list['customer.password'] : null );
				$item = $custManager->createItem()->fromArray( $list );

				$this->sendEmail( $context, $item, $password );

				$str = sprintf( 'Sent customer account e-mail to "%1$s"', $item->getPaymentAddress()->getEmail() );
				$context->getLogger()->log( $str, \Aimeos\MW\Logger\Base::DEBUG );
			}
			catch( \Exception $e )
			{
				$str = 'Error while trying to send customer account e-mail: ' . $e->getMessage();
				$context->getLogger()->log( $str );
			}

			$queue->del( $msg );
		}
	}
124029
public function run()
    {
        if ($this->stage++ > 0) {
            $this->header('500 Too Busy');
            return;
        }
        if ($this->attrs->raw === '') {
            $this->header('500 Internal Server Error');
            echo 'Payload expected.';
            return;
        }
        if (!json_decode($this->attrs->raw, true)) {
            $this->header('500 Internal Server Error');
            echo 'Broken JSON encoding.';
            return;
        }
        $this->appInstance->publish('c2s:' . $this->sessId, $this->attrs->raw, function ($redis) {
            if (!$this->headers_sent) {
                if ($redis->result === 0) {
                    $this->header('404 Not Found');
                } else {
                    $this->header('204 No Content');
                }
            }
            $this->finish();
        });
        $this->sleep(10);
    }
1370066
public function run()
    {
        header('HTTP/1.1 200 OK');
        header('Content-Type: text/event-stream;charset=UTF-8');
        header('Cache-Control: no-cache, no-store, max-age=0, must-revalidate');
        header('Pragma: no-cache');

        while (1) {
            $stats = $this->metricsPoller->getStatsForCommandsRunning();

            if (empty($stats)) {
                echo "ping: \n\n";
            } else {
                foreach ($stats as $commandStats) {
                    echo "data: " . json_encode($commandStats) . "\n\n";
                }
            }

            ob_flush();
            flush();
            usleep($this->delay * 1000);
        }
    }
1145504
public function call()
    {
        if($this->vitex->getConfig('csrf.open')){
            $this->getCsrfHtml();
            $this->verify();
        }
        $this->runNext();
    }
442300
public function run()
	{
		echo '<html><head><title>Address consent result</title></head><body>';
		$noConsentResponse = $this->_getOrderReferenceDetailsWithoutAddressConsent();
		$this->_validateOrderReferenceIsInACorrectState($noConsentResponse);
		
		$consentResponse = $this->_getOrderReferenceDetailsWithAddressConsent();
		
		$this->_printOrderReferenceResponses($noConsentResponse, $consentResponse);
		echo '</body></html>';
	}
243713
public function run() {
		
		$id = $this->htmlOptions['id'];

		echo CHtml::closeTag('div'); //modal-content
        	echo CHtml::closeTag('div'); //modal-dialog
        	echo CHtml::closeTag('div'); //modal

		/** @var CClientScript $cs */
		$cs = Yii::app()->getClientScript();

		$options = !empty($this->options) ? CJavaScript::encode($this->options) : '';
		$cs->registerScript(__CLASS__ . '#' . $id, "jQuery('#{$id}').modal({$options});");

		foreach ($this->events as $name => $handler) {
			$handler = CJavaScript::encode($handler);
			$cs->registerScript(__CLASS__ . '#' . $id . '_' . $name, "jQuery('#{$id}').on('{$name}', {$handler});");
		}
	}
1293249
public function run()
    {
        set_error_handler(array('\Slim\App', 'handleErrors'));

        // Invoke middleware and application stack
        try {
            $this['middleware'][0]->call();
        } catch (\Exception $e) {
            $this['response']->write($this->callErrorHandler($e), true);
        }

        // Finalize and send response
        $this->finalize();

        restore_error_handler();
    }
275228
public function run()
    {
        require __DIR__.'/../../../../vendor/autoload.php';
        if ($this->error !== true) {
            if ($this->error === -404) {
                if ($this->API->datacenter->sockets[$this->current]->temp_auth_key !== null) {
                    $this->logger->logger(\danog\MadelineProto\Lang::$current_lang['resetting_auth_key'], \danog\MadelineProto\Logger::WARNING);
                    $this->API->datacenter->sockets[$this->current]->temp_auth_key = null;
                    $this->API->init_authorization();

                    throw new \danog\MadelineProto\Exception(\danog\MadelineProto\Lang::$current_lang['recreate_temp_auth_key']);
                }
            }

            throw new \danog\MadelineProto\RPCErrorException($this->error, $this->error);
        }
        $this->API->handle_messages($this->current);
        $this->setGarbage();
    }
229749
public function run()
    {
        if ($this->hasModel()) {
            $input = Html::activeTextInput($this->model, $this->attribute, $this->options);
            $this->mobileField = Html::getInputId($this->model,$this->mobileField);
        } else {
            $input = Html::textInput($this->name, $this->value, $this->options);
            $this->mobileField = $this->name;
        }
        $button = Html::button(Yii::t('yuncms', 'Get Verify Code'), $this->buttonOptions);

        $this->registerClientScript();
        echo strtr($this->template, [
            '{input}' => $input,
            '{button}' => $button,
        ]);
    }
1121379
public function run()
    {
        if (!(bool)$this->ready) {
            $this->init();
        }

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

        $this->displayRuntimeHeader();
        $this->loadMiddleware();
    }