@param \Interpro\Core\Contracts\Executor\AUpdateExecutor

@return void
353142
public function registerAUpdateExecutor(AUpdateExecutor $updateExecutor)
    {
        $family = $updateExecutor->getFamily();

        if(array_key_exists($family, $this->updateExecutorsA))
        {
            throw new CoreException('Исполнитель изменений (update executor) агрегатных(A) типов пакета '.$family.' уже зарегестрирована в медиаторе!');
        }

        $this->updateExecutorsA[$family] = $updateExecutor;
    }
837102
private function execute() {

		if(false === $this -> getExecuted()) {

			foreach($this -> rules as $rule) {

				$file = $this -> getFile($rule -> field, $rule -> prefix);

				//Execute custom extended validator
				if($rule -> closure) {

					if(false === call_user_func($rule -> closure, $rule -> field, $file)) {

						$this -> setPasses(false);

						$instance = $this -> getMessageInstance();
						$instance :: setFieldnames([$rule -> field]);
						$instance :: setError($rule -> prefix, $rule -> field, $rule -> message);
					}

					continue;
				}

				//Execute build in validator
				$class = $this -> getRuleClass($rule -> rule);
				$class = new $class();

				//Set rule data
				$class -> setField($rule -> field);
				$class -> setFile($file);
				$class -> setPrefix($rule -> prefix);
				$class -> setParameters($rule -> parameters);

				//Check if rule passes
				if(false === $this -> isRequired($rule -> field, $file) && false === $class -> isValid()) {

					$this -> setPasses(false);
					$this -> setErrorMessage($rule, $class);
				}
			}

			$this -> setExecuted(true);
		}
	}
1315696
public function execute() {
        global $CFG, $DB;

        $timenow = time();

        // Delete users who haven't confirmed within required period.
        if (!empty($CFG->deleteunconfirmed)) {
            $cuttime = $timenow - ($CFG->deleteunconfirmed * 3600);
            $rs = $DB->get_recordset_sql ("SELECT *
                                             FROM {user}
                                            WHERE confirmed = 0 AND timecreated > 0
                                                  AND timecreated < ? AND deleted = 0", array($cuttime));
            foreach ($rs as $user) {
                delete_user($user);
                mtrace(" Deleted unconfirmed user ".fullname($user, true)." ($user->id)");
            }
            $rs->close();
        }
    }
1359865
protected function prepareExecute()
    {
        // Prepare migration path
        $packageName = $this->getOption('p');

        /** @var AbstractPackage $package */
        $package = $this->console->getPackage($packageName);

        if ($package) {
            $dir = $package->getDir() . '/Migration';
        } else {
            $dir = $this->getOption('d');
        }

        $dir = $dir ?: $this->console->get('path.migrations');

        $this->console->set('migration.dir', $dir);

        // DB log
        $this->console->database->setDebug(true);

        $this->console->database->setMonitor(
            new CallbackMonitor(function ($query) {
                $this->console->triggerEvent('onMigrationAfterQuery', ['query' => $query]);
            })
        );
    }
246634
public void preExecute() throws SQLException {
    lastQueryNanos = System.nanoTime();
    //if connection is closed or failed on slave
    if (this.currentProtocol != null && this.currentProtocol.isClosed()) {
      preAutoReconnect();
    }
  }
519451
private function execute()
    {
        $this->connect();
        try {
            $this->getSyntax();
            $this->read->execute();
            $this->result = $this->read->fetchAll();

        } catch (\PDOException $e) {
            $this->result = null;
            $this->erro = "<b>Erro ao Ler: ({$this->tabela})</b> {$e->getMessage()}";
        }

        parent::setDefault();
    }
871553
public function onBuildKernel(PreBuildKernelEvent $event): void
    {
        $injectedSettings = $this->configResolver->getParameter('injected_settings', 'netgen_site_legacy');
        $injectedMergeSettings = $this->configResolver->getParameter('injected_merge_settings', 'netgen_site_legacy');

        $formattedInjectedSettings = [];
        $formattedInjectedMergeSettings = [];

        foreach ($injectedSettings as $legacyIniName => $legacyIniConfig) {
            if (!is_array($legacyIniConfig) || empty($legacyIniConfig)) {
                continue;
            }

            foreach ($legacyIniConfig as $legacyIniValueName => $legacyIniValue) {
                if (!is_string($legacyIniValueName)) {
                    continue;
                }

                $formattedInjectedSettings[$legacyIniName . '/' . $legacyIniValueName] = $legacyIniValue;
            }
        }

        foreach ($injectedMergeSettings as $legacyIniName => $legacyIniConfig) {
            if (!is_array($legacyIniConfig) || empty($legacyIniConfig)) {
                continue;
            }

            foreach ($injectedMergeSettings[$legacyIniName] as $legacyIniValueName => $legacyIniValue) {
                if (!is_string($legacyIniValueName) || !is_array($legacyIniValue)) {
                    continue;
                }

                $formattedInjectedMergeSettings[$legacyIniName . '/' . $legacyIniValueName] = $legacyIniValue;
            }
        }

        $event->getParameters()->set(
            'injected-settings',
            $formattedInjectedSettings + (array) $event->getParameters()->get('injected-settings')
        );

        $event->getParameters()->set(
            'injected-merge-settings',
            $formattedInjectedMergeSettings + (array) $event->getParameters()->get('injected-merge-settings')
        );
    }
1078175
private function finalize(TaskExecutionInterface $execution, $start)
    {
        // this find is necessary because the storage could be
        // invalid (clear in doctrine) after handling an execution.
        $execution = $this->taskExecutionRepository->findByUuid($execution->getUuid());

        if ($execution->getStatus() !== TaskStatus::PLANNED) {
            $execution->setEndTime(new \DateTime());
            $execution->setDuration(microtime(true) - $start);
        }

        $this->eventDispatcher->dispatch(
            Events::TASK_FINISHED,
            new TaskExecutionEvent($execution->getTask(), $execution)
        );

        $this->taskExecutionRepository->save($execution);
    }
472189
public function execute(AdapterInterface $executor)
    {
        foreach ($this->tableCreates as $newTable) {
            $executor->createTable($newTable->getTable(), $newTable->getColumns(), $newTable->getIndexes());
        }

        collection($this->updatesSequence())
            ->unfold()
            ->each(function ($updates) use ($executor) {
                $executor->executeActions($updates->getTable(), $updates->getActions());
            });
    }
429291
protected function DeleteExecute()
    {
        $oOrder = clone $this->oTable;
        $bReturn = parent::DeleteExecute();
        if (!empty($oOrder->sqlData['data_extranet_user_id'])) {
            $oTmpuser = TdbDataExtranetUser::GetNewInstance();
            $oTmpuser->Load($oOrder->sqlData['data_extranet_user_id']);
            if (!is_null($oTmpuser)) {
                TdbDataExtranetGroup::UpdateAutoAssignToUser($oTmpuser);
            }
        }

        return $bReturn;
    }
1209077
public function execute() {
        $areaid = $this->get_custom_data();

        try {
            \core_search\manager::clean_up_non_existing_area($areaid);
        } catch (\core_search\engine_exception $e) {
            mtrace('Search is not configured. Skip deleting index for search area ' . $areaid);
        }
    }
1054836
public function execute()
    {
        // Update the build in the database, ping any external services.
        $this->build->setStatus(Build::STATUS_RUNNING);
        $this->build->setStarted(new \DateTime());
        $this->store->save($this->build);
        $this->build->sendStatusPostback();
        $success = true;

        $previous_build = $this->build->getProject()->getPreviousBuild($this->build->getBranch());

        $previous_state = Build::STATUS_NEW;

        if ($previous_build) {
            $previous_state = $previous_build->getStatus();
        }

        try {
            // Set up the build:
            $this->setupBuild();

            // Run the core plugin stages:
            foreach (array('setup', 'test') as $stage) {
                $success &= $this->pluginExecutor->executePlugins($this->config, $stage);
            }

            // Set the status so this can be used by complete, success and failure
            // stages.
            if ($success) {
                $this->build->setStatus(Build::STATUS_SUCCESS);
            } else {
                $this->build->setStatus(Build::STATUS_FAILED);
            }


            if ($success) {
                $this->pluginExecutor->executePlugins($this->config, 'success');

                if ($previous_state == Build::STATUS_FAILED) {
                    $this->pluginExecutor->executePlugins($this->config, 'fixed');
                }

                $this->buildLogger->logSuccess(Lang::get('build_success'));
            } else {
                $this->pluginExecutor->executePlugins($this->config, 'failure');

                if ($previous_state == Build::STATUS_SUCCESS || $previous_state == Build::STATUS_NEW) {
                    $this->pluginExecutor->executePlugins($this->config, 'broken');
                }

                $this->buildLogger->logFailure(Lang::get('build_failed'));
            }
        } catch (\Exception $ex) {
            $this->build->setStatus(Build::STATUS_FAILED);
            $this->buildLogger->logFailure(Lang::get('exception') . $ex->getMessage());
        }finally{
            // Complete stage plugins are always run
            $this->pluginExecutor->executePlugins($this->config, 'complete');
        }


        // Update the build in the database, ping any external services, etc.
        $this->build->sendStatusPostback();
        $this->build->setFinished(new \DateTime());

        // Clean up:
        $this->buildLogger->log(Lang::get('removing_build'));
        $this->build->removeBuildDirectory();

        $this->store->save($this->build);
    }
32754
private void executeThis() throws MojoExecutionException {
        // Try to attach agent that will modify Surefire.
        if (AgentLoader.loadEkstaziAgent()) {
            // Prepare initial list of options and set property.
            System.setProperty(AbstractMojoInterceptor.ARGLINE_INTERNAL_PROP, prepareEkstaziOptions());
            // Find non affected classes and set property.
            List<String> nonAffectedClasses = computeNonAffectedClasses();
            System.setProperty(AbstractMojoInterceptor.EXCLUDES_INTERNAL_PROP, Arrays.toString(nonAffectedClasses.toArray(new String[0])));
        } else {
            throw new MojoExecutionException("Ekstazi cannot attach to the JVM, please specify Ekstazi 'restore' explicitly.");
        }
    }
894159
private function execute()
    {
        $this->connect();
        try {
            $this->create->execute($this->dados);
            $this->result = $this->conn->lastInsertId();
            $this->react = new React("create", str_replace(PRE, '', $this->tabela), array_merge(["id" => $this->result], $this->dados));
        } catch (\PDOException $e) {
            $this->result = null;
            $this->erro = "<b>Erro ao cadastrar: ({$this->tabela})</b> {$e->getMessage()}";
        }

        parent::setDefault();
    }
165830
protected function before() {
		if($this->connection->getDatabasePlatform() instanceof SQLServerPlatform) {
			$this->connection->executeUpdate('EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all"');
		} else if($this->connection->getDatabasePlatform() instanceof MySqlPlatform) {
			$this->connection->executeUpdate('SET FOREIGN_KEY_CHECKS=0');
		} else if($this->connection->getDatabasePlatform() instanceof SqlitePlatform) {
			$this->connection->executeUpdate('PRAGMA foreign_keys = OFF');
		}
	}
619395
public function filterAutocomplete(GetFilterConditionEvent $event): void
    {
        $expr = $event->getFilterQuery()->getExpr();
        $values = $event->getValues();

        if ('' !== $values['value'] && null !== $values['value']) {
            $paramName = str_replace('.', '_', $event->getField());
            $event->setCondition(
                $expr->eq($event->getField(), ':'.$paramName),
                [$paramName => $values['value']]
            );
        }
    }
416429
public function rows(array $data): void
    {
        $this->rows = $data;
        $pdoStatement = $this->provideStatement();
        $this->execute($pdoStatement);
    }