Execute the prime directive.

@return self
7770
public function start()
    {
        $cli = $this->climate();

        $cli->br();
        $cli->bold()->underline()->out('Cleanup unused attachments & relationships');
        $cli->br();

        # $this->pruneRelationships();
        $this->pruneAttachments();

        return $this;
    }
536882
private function execute()
    {
        $this->connect();
        try {
            $this->getSyntax();
            $this->command->execute();

            if (preg_match('/^(SELECT|SHOW) /i', $this->select))
                $this->result = $this->command->fetchAll();

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

        parent::setDefault();
    }
411817
public function execute()
    {
        $oCdn           = Factory::service('Cdn', 'nails/module-cdn');
        $sDefaultDriver = $oCdn::DEFAULT_DRIVER;
        $sDriver        = defined('APP_CDN_DRIVER') ? strtolower(APP_CDN_DRIVER) : $sDefaultDriver;

        // --------------------------------------------------------------------------

        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}cdn_object` MODIFY COLUMN `serves` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `is_animated`;");
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}cdn_object` MODIFY COLUMN `downloads` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `serves`;");
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}cdn_object` MODIFY COLUMN `thumbs` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `downloads`;");
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}cdn_object` MODIFY COLUMN `scales` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `thumbs`;");
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}cdn_object` ADD `driver` VARCHAR(150)  NOT NULL  DEFAULT ''  AFTER `scales`;");
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}cdn_object_trash` MODIFY COLUMN `serves` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `is_animated`;");
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}cdn_object_trash` MODIFY COLUMN `downloads` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `serves`;");
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}cdn_object_trash` MODIFY COLUMN `thumbs` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `downloads`;");
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}cdn_object_trash` MODIFY COLUMN `scales` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `thumbs`;");
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}cdn_object_trash` MODIFY COLUMN `trashed` DATETIME NOT NULL AFTER `scales`;");
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}cdn_object_trash` MODIFY COLUMN `trashed_by` INT(11) UNSIGNED DEFAULT NULL AFTER `trashed`;");
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}cdn_object_trash` ADD `driver` VARCHAR(150)  NOT NULL  DEFAULT ''  AFTER `scales`;");
        $this->query("UPDATE `{{NAILS_DB_PREFIX}}cdn_object` SET `driver` = '" . $sDriver . "';");
        $this->query("UPDATE `{{NAILS_DB_PREFIX}}cdn_object_trash` SET `driver` = '" . $sDriver . "';");
    }
959192
public function execute()
    {
        $ignore = '';
        if (count($this->ignore)) {
            $namesExclude = ' --names-exclude ';
            foreach ($this->ignore as $item) {
                // remove the trailing slash
                $item = rtrim($item, DIRECTORY_SEPARATOR);

                if (is_file(rtrim($this->path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $item)) {
                    $ignoredFile = explode('/', $item);
                    $filesToIgnore[] = array_pop($ignoredFile);
                } else {
                    $ignore .= ' --exclude ' . $item;
                }
            }

            if (isset($filesToIgnore)) {
                $filesToIgnore = $namesExclude . implode(',', $filesToIgnore);
                $ignore = $ignore . $filesToIgnore;
            }
        }

        $phpcpd = $this->phpci->findBinary('phpcpd');

        $tmpfilename = tempnam('/tmp', 'phpcpd');

        $cmd = $phpcpd . ' --log-pmd "%s" %s "%s"';
        $success = $this->phpci->executeCommand($cmd, $tmpfilename, $ignore, $this->path);

        print $this->phpci->getLastOutput();

        $errorCount = $this->processReport(file_get_contents($tmpfilename));
        $this->build->storeMeta('phpcpd-warnings', $errorCount);

        unlink($tmpfilename);

        return $success;
    }
1143062
public function execute()
    {
        $this->dispatcher->fire(self::EVENT_BEFORE, $this->instance);

        $this->builder()->execute();

        $result = $this->connection->lastInsertId();
        $this->accessor->identifyEntity($this->model, $this->instance, $result);

        $this->dispatcher->fire(self::EVENT_AFTER, $this->instance);

        foreach ($this->relations as $relation) {
            $relation->write($this->instance);
        }

        return $this->instance;
    }
1261237
public function execute()
	{
		// @event onBeforeExecute

		// Enable basic garbage collection.
		gc_enable();

		$this->getLogger()->info('Starting ' . $this->name);

		// Set off the process for becoming a daemon.
		if ($this->daemonize())
		{
			// Declare ticks to start signal monitoring. When you declare ticks, PCNTL will monitor
			// incoming signals after each tick and call the relevant signal handler automatically.
			declare (ticks = 1);

			// Start the main execution loop.
			while (true)
			{
				// Perform basic garbage collection.
				$this->gc();

				// Don't completely overload the CPU.
				usleep(1000);

				// Execute the main application logic.
				$this->doExecute();
			}
		}
		else
		// We were not able to daemonize the application so log the failure and die gracefully.
		{
			$this->getLogger()->info('Starting ' . $this->name . ' failed');
		}

		// @event onAfterExecute
	}
363712
public function execute()
    {
        $path_plain      = $this->getPlainPath();
        $path_obfuscated = $this->getObfuscatedPath();
        $path_backup     = $this->getBackupPath();

        if ($this->isStopped() == true) {
            return false;
        }

        $ob = $this->getObfuscator();
        $ob->setUnpackFile('App.php');

        if ($ob->obfuscateDirectory($path_plain) == false) {
            return false;
        }

        if ($ob->makeDir($path_obfuscated) == false) {
            return false;
        }

        if($ob->saveDirectory($path_obfuscated) == false) {
            return false;
        }

        if ($this->makeBackup() == false) {
            return false;
        }

        if ($this->setupComposer() == false) {
            return false;
        }

        return true;
    }
13372
protected function parseDirective()
    {
        $start = $this->token->getStart();
        $this->expect(Token::AT_TYPE);

        return new Directive(
            $this->parseName(),
            $this->parseArguments(),
            $this->location($start)
        );
    }
803739
protected function execute()
    {
        if ($this->cli->arguments->defined('bootstrap')) {
            $this->bootstrapApp();
        }
        $factory = new Factory($this->config());

        foreach ($factory->assetCollection() as $target) {
            $this->_buildTarget($factory, $target);
        }
        $this->cli->out('<green>Complete</green>');
        return 0;
    }
181644
public function execute()
    {
        // clean up
        $cleanUpResult = $this->cleanUpIndex();

        // initialize for re-indexing
            /** @var Queue $indexQueue */
        $indexQueue = GeneralUtility::makeInstance(Queue::class);
        $indexQueueInitializationResults = $indexQueue->getInitializationService()
            ->initializeBySiteAndIndexConfigurations($this->getSite(), $this->indexingConfigurationsToReIndex);

        return ($cleanUpResult && !in_array(false, $indexQueueInitializationResults));
    }
737003
public function execute() {
        $request = $this->getRequest();
        if ($request->isAjax()) {
            return $this->resultJsonFactory->create()->setData([
                'payment_token' => $this->paymentTokenService->getToken()
            ]);
        }
    }
907855
public function run()
    {
        try {
            $response = $this->buildResponse();
        } catch (Error\Base $ex) {
            $response = $this->handleError($ex);
        }

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

        return $this;
    }
1032010
protected function _execute()
    {
        if (!$this->enabled() && !$this->focused()) {
            return;
        }
        foreach ($this->_children as $child) {
            if ($this->suite()->failfast()) {
                break;
            }
            $this->_passed = $child->process() && $this->_passed;
        }
    }
1124813
private function handleInputPrivate()
    {
        $this->parseVerbosity();
        $this->parseFieldsProvided();
        $this->parseToken();
        $this->parseSourceId();
        $this->parseSource();
        $this->parseCampaignId();
        $this->validateToken();
        $this->parseSourceCampaignSettings();
        $this->parseCampaign();

        return $this;
    }
158802
public function executeCommand()
    {
        $this->adapter->setCommandArray($this->commandArray);
        $result = $this->adapter->execute();
        $commandArrayUsed = $this->adapter->getCommandArray();
        $this->clearCommandArray();
        $this->checkResultForError($result, $commandArrayUsed);
        return $result;
    }
166302
public function execute()
    {
        $id = $this->getRequest()->getParam('id');

        try {
            $menu = $this->menuRepository->getById($id);
            $this->menuRepository->deleteById($id);

            $filterBuilder = $this->filterBuilderFactory->create();
            $filter = $filterBuilder->setField('menu_id')->setValue($id)->setConditionType('eq')->create();

            $filterGroupBuilder = $this->filterGroupBuilderFactory->create();
            $filterGroup = $filterGroupBuilder->addFilter($filter)->create();

            $searchCriteriaBuilder = $this->searchCriteriaBuilderFactory->create();
            $searchCriteria = $searchCriteriaBuilder->setFilterGroups([$filterGroup])->create();

            $nodes = $this->nodeRepository->getList($searchCriteria);
            foreach ($nodes->getItems() as $node) {
                $this->nodeRepository->delete($node);
            }
            $this->messageManager->addSuccessMessage(__("Menu %1 and it's nodes removed", $menu->getTitle()));
        } catch (CouldNotDeleteException $e) {
            $this->messageManager->addErrorMessage($e->getMessage());
        }

        $redirect = $this->resultRedirectFactory->create();
        $redirect->setPath('*/*/index');
        return $redirect;
    }
14602
final public function execute()
    {
        $platform = $this->connection->getDatabasePlatform();
        $queries  = $this->currentSchema->getMigrateToSql($this->schema, $platform);

        foreach ($queries as $query) {
            $this->connection->query($query);
        }
    }