Run the analysis.

@return object
169844
protected function run()
    {
        $pack = $this->rec->getResourcePack();
        $this->version = $this->get(VersionAnalyzer::class);
        $version = $this->version;

        $players = $this->get(PlayerMetaAnalyzer::class);

        // The player number is used for chat messages.
        $playersByNumber = [];
        // The player index is used for game actions.
        $playersByIndex = [];
        foreach ($players as $player) {
            $playersByNumber[$player->number] = $player;
            $playersByIndex[$player->index] = $player;
        }

        $this->playersByNumber = $playersByNumber;

        $size = strlen($this->body);

        $this->position = 0;
        if ($version->isMgl) {
            $this->processGameStart();
        }

        while ($this->position < $size - 3) {
            $operationType = $this->readBody('l', 4);

            if ($operationType === self::OP_CHAT) {
                // AoC and up store the game start message with the same ID
                // as a CHAT message, but chat messages are prefixed with 0xFFFF_FFFF
                $syncChecksumInterval = $this->readBody('l', 4);
                if ($syncChecksumInterval === -1) {
                    $this->processChatMessage();
                } else {
                    $this->position -= 4;
                    $this->processGameStart();
                }
            } else if ($operationType === self::OP_SYNC) {
                $this->syncIndex++;
                // There are a lot of sync packets, so we get a significant
                // speedup just from doing this inline (and not in a separate
                // method), and by using `unpack` and manual position increments
                // instead of `readBody`.
                $data = unpack('l2', substr($this->body, $this->position, 8));
                $this->currentTime += $data[1]; // $this->readBody('l', 4);
                if ($this->syncIndex === $this->syncChecksumInterval) {
                    // no need to parse checksums
                    $this->position += 28;
                }
            } else if ($operationType === self::OP_VIEWLOCK) {
                // just skip for now
                $this->position += 12;
            } else if ($operationType === self::OP_COMMAND) {
                $length = $this->readBody('l', 4);
                $next = $this->position + $length;
                $command = ord($this->body[$this->position]);
                $this->position++;

                switch ($command) {
                    // player resign
                    case self::COMMAND_RESIGN:
                        $playerIndex = ord($this->body[$this->position]);
                        $playerNumber = ord($this->body[$this->position + 1]);
                        $disconnected = ord($this->body[$this->position + 2]);
                        $this->position += 3;
                        $player = $playersByIndex[$playerIndex];
                        if ($player && $player->resignTime === 0) {
                            $player->resignTime = $this->currentTime;
                            $message = sprintf('%s resigned', $player->name);
                            $this->chatMessages[] = new ChatMessage($this->currentTime, null, $message);
                        }
                        break;
                    // researches
                    case self::COMMAND_RESEARCH:
                        $this->position += 3;
                        $buildingId = $this->readBody('l', 4);
                        $playerId = $this->readBody('v', 2);
                        $researchId = $this->readBody('v', 2);
                        $player = $playersByIndex[$playerId];
                        if (!$player) {
                            break;
                        }

                        switch ($researchId) {
                            case self::RESEARCH_FEUDAL:
                                $researchDuration = 130000;
                                $player->feudalTime = $this->currentTime + $researchDuration;
                                break;
                            case self::RESEARCH_CASTLE:
                                // persians have faster research time
                                $researchDuration = 160000;
                                if ($player->civId === Civilization::PERSIANS) {
                                    $researchDuration /= 1.10;
                                }
                                $player->castleTime = $this->currentTime + round($researchDuration);
                                break;
                            case self::RESEARCH_IMPERIAL:
                                $researchDuration = 190000;
                                if ($player->civId === Civilization::PERSIANS) {
                                    $researchDuration /= 1.15;
                                }
                                $player->imperialTime = $this->currentTime + round($researchDuration);
                                break;
                        }
                        $player->addResearch($researchId, $this->currentTime);
                        break;
                    // training unit
                    case self::COMMAND_TRAIN:
                        $this->position += 3;
                        $buildingId = $this->readBody('l', 4);
                        $unitType = $this->readBody('v', 2);
                        $amount = $this->readBody('v', 2);

                        if (!isset($this->units[$unitType])) {
                            $this->units[$unitType] = $amount;
                        } else {
                            $this->units[$unitType] += $amount;
                        }
                        break;
                    // AI trains unit
                    case self::COMMAND_TRAIN_SINGLE:
                        $this->position += 9;
                        $unitType = $this->readBody('v', 2);
                        if (!isset($this->units[$unitType])) {
                            $this->units[$unitType] = 1;
                        } else {
                            $this->units[$unitType] += 1;
                        }
                        break;
                    // building
                    case self::COMMAND_BUILD:
                        $this->position += 1;
                        $playerId = $this->readBody('v', 2);
                        $this->position += 8;
                        $buildingType = $this->readBody('v', 2);

                        $buildingType = $pack->normalizeUnit($buildingType);

                        if (!isset($this->buildings[$playerId][$buildingType])) {
                            $this->buildings[$playerId][$buildingType] = 1;
                        } else {
                            $this->buildings[$playerId][$buildingType]++;
                        }
                        break;
                    // tributing
                    case self::COMMAND_TRIBUTE:
                        $playerIdFrom = ord($this->body[$this->position++]);
                        $playerIdTo = ord($this->body[$this->position++]);
                        $resourceId = ord($this->body[$this->position++]);

                        $playerFrom = $playersByIndex[$playerIdFrom];
                        $playerTo = $playersByIndex[$playerIdTo];

                        if ($playerFrom && $playerTo) {
                            $amount = $this->readBody('f', 4);
                            $marketFee = $this->readBody('f', 4);

                            $tribute = new Tribute();
                            $tribute->time = $this->currentTime;
                            $tribute->playerFrom = $playerFrom;
                            $tribute->playerTo = $playerTo;
                            $tribute->resourceId = $resourceId;
                            $tribute->amount = floor($amount);
                            $tribute->fee = $marketFee;
                            $this->tributes[] = $tribute;
                        } else {
                            $this->position += 8;
                        }
                        break;
                    // multiplayer postgame data in UP1.4 RC2+
                    case self::COMMAND_POSTGAME:
                        $this->postGameData = $this->read(PostgameDataAnalyzer::class);
                        break;
                    default:
                        break;
                }

                $this->position = $next;
            }
        }

        if (!empty($this->chatMessages)) {
            usort($this->chatMessages, function ($a, $b) {
                return $a->time - $b->time;
            });
        }

        if (!empty($this->buildings)) {
            ksort($this->buildings);
        }

        $analysis = new \StdClass;
        $analysis->duration = $this->currentTime;
        $analysis->tributes = $this->tributes;
        $analysis->chatMessages = $this->chatMessages;
        $analysis->units = $this->units;
        $analysis->buildings = $this->buildings;
        $analysis->postGameData = $this->postGameData;

        return $analysis;
    }
690247
public function run()
	{
		$this->generator->addRaw(
			array(
				  'location'         => 'example.com',
				  'last_modified'    => '2013-01-28',
				  'change_frequency' => 'weekly',
				  'priority'         => '0.65'
			)
		);

		$this->generator->addRaw(
			array(
				  'location'         => 'example.com/test',
				  'last_modified'    => '2013-12-28',
				  'change_frequency' => 'weekly',
				  'priority'         => '0.95'
			)
		);

		$this->generator->addRaw(
			array(
				  'location'         => 'example.com/test/2',
				  'last_modified'    => '2013-12-25',
				  'change_frequency' => 'weekly',
				  'priority'         => '0.99'
			)
		);

		return $this->generator->generate();
	}
854083
public function runAction()
    {
        $request = $this->getRequest();
        /* @var $request \Zend\Console\Request */

        $serviceParameters = array();

        foreach ($this->paramsToTest as $params) {
            foreach ($params as $param) {
                if ($result = $request->getParam($param)) {
                    $serviceParameters[$params[0]] = $result;
                    continue;
                }
            }
        }

        $runner = $this->runner;
        $runner->setParams($serviceParameters);
        $output = $runner->run();

        $response = $this->getResponse();
        /* @var $response \Zend\Console\Response */
        $response->setContent($output);
        $response->setErrorLevel($runner->getExitCode());
        return $response;
    }
1214959
public function run()
    {
        $res = '';
        if (!$this->_renderTo) {
            $this->clientOptions['chart']['renderTo'] = $this->options['id'];
            $options = $this->options;
            $tag = ArrayHelper::remove($options, 'tag', 'div');
            $res = Html::tag($tag, '', $options);
        }
        $this->registerClientScript();
        return $res;
    }
6581
public function run()
    {
        if (!$this->beforeRun()) {
            return;
        }
        $result = null;
        if (is_callable($this->work)) {
            $result = call_user_func_array($this->work, [$this, $this->getData()]);
        }

        return $this->afterRun($result);
    }
163502
public function run()
    {
        $model = $this->findModelOrCreate();
        $attribute = $this->getModelAttribute();
        $value = Yii::$app->request->post('value');

        if ($this->preProcess && is_callable($this->preProcess, true)) {
            call_user_func($this->preProcess, $model);
        }

        $model->setScenario($this->scenario);
        $model->$attribute = $value;

        if ($model->validate([$attribute])) {
            return $model->save(false);
        } else {
            throw new BadRequestHttpException($model->getFirstError($attribute));
        }
    }
130538
public final function run()
    {
        $this->registerServices();
        $this->registerCommands();
        return $this->symfonyApplication->run($this->input, $this->output);
    }
1201945
public function run()
    {
        $searchModel = $this->newSearchModel();
        $dataProvider = $this->dataProvider($searchModel);

        return $this->controller->render($this->view, [
            $this->nameVariableModel => $searchModel,
            $this->nameVariableDataProvider => $dataProvider,
        ]);
    }
52158
public function run()
    {
        MaterializeAsset::register($this->getView());
        $html[] = $this->renderItems();

        return implode("\n", $html);
    }
499870
public function run()
    {
        $res1 = $this->gcPersistent();
        $res2 = $this->gcUserLinks();
        $res3 = $this->gcActive();

        return $res1 && $res2 && $res3;
    }
1206674
public function run()
    {
        
        if (!empty($this->request)) {
            foreach ($this->request as $key => $value) {
                $this->_iterate($key, $value);
            }
        }
         
        return $this->getReport();
    }
550835
public function run()
    {
        MaterializeAsset::register($this->getView());
        return Html::tag('div', $this->renderItems(), $this->options);
    }
1233624
public function run()
    {
        // Run compilation based on class dependencies.
        $this->runCompilationByArrangedPriority();

        // Run remaining components (if any).
        foreach ($this->components as $name => $classes) {
            $this->compileGroupClasses($name, $classes);
        }

        // Append application file to the bottom.
        $original = $this->config->get('compile.files', []);

        foreach ($original as $class) {
            $this->collection['added'][] = $class;
        }

        $this->config->set('compile.files', $this->collection['added']);

        return new Fluent([
            'added'   => $this->collection['added'],
            'missing' => $this->collection['missing'],
        ]);
    }
196321
public function run()
    {
        $request = $this->container->get(self::REQUEST);

        $response = $this->handle($request);

        return $this->emit($response)->stream();
    }
856110
public function run() {

		$post = yii::$app->request->post();

		if( isset( $this->model ) && isset( $post[ 'itemId' ] ) ) {

			$mappingType = isset( $post[ 'ctype' ] ) ? $post[ 'ctype' ] : null;

			$modelMapper = $this->modelMapperService->activateByModelId( $this->model->id, $this->parentType, $post[ 'itemId' ], $mappingType );

			$data = [ 'cid' => $modelMapper->id, 'name' => $modelMapper->model->name ];

			// Trigger Ajax Success
			return AjaxUtil::generateSuccess( Yii::$app->coreMessage->getMessage( CoreGlobal::MESSAGE_REQUEST ), $data );
		}

		// Trigger Ajax Failure
		return AjaxUtil::generateFailure( Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_NOT_FOUND ) );
	}
64193
public function run() {

        foreach ( $this->requests as $request ) {

            if ( isset($request['ERROR_CODE']) && isset($request['ERROR_MESSAGE']) ) {

                $this->logger->warning("Invalid request ".$request['ID']);

                $result = self::packJsonError($request['ERROR_CODE'], $request['ERROR_MESSAGE'], $request['ID']);

                if ( !is_null($result) ) $this->results[] = $result;

            } else {

                try {

                    $this->logger->debug("Serving request ".$request['METHOD']."(".$request['ID'].")");

                    $response = $this->runSingleRequest($request['METHOD'], $request['PARAMETERS']);

                    $result = self::packJsonSuccess($response, $request['ID']);

                } catch (RpcException $re) {

                    $this->logger->warning("Error handling request ".$request['ID'].": ".$re->getMessage());

                    $result = self::packJsonError($re->getCode(), $re->getMessage(), $request['ID']);

                } catch (Exception $e) {

                    $this->logger->error($e->getMessage());

                    throw $e;

                }

                if ( !is_null($result) ) $this->results[] = $result;

            }


        }

        if ( empty($this->results) ) {

            return null;

        } else if ( $this->is_batch_request ) {

            return $this->results;

        } else {

            return $this->results[0];

        }

    }
892896
public function run()
    {
        if (! $this->runPreSearch()) {
            return $this->value;
        }

        if ((strlen($this->value) % 4 == 0) and preg_match('/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/isU', $this->value)) {
            $decoded = base64_decode($this->value, true);
            if (base64_encode($decoded) === $this->value) {
                return $decoded;
            }
        }

        return $this->value;
    }