Check update object for a command and process.

@param Update $update
548001
public function processCommand(Update $update)
    {
        $message = $update->getMessage();

        if ($message !== null && $message->has('text')) {
            $this->getCommandBus()->handler($message->getText(), $update);
        }
    }
260501
public function check(Command $console)
    {
        $this->console = $console;

        $this->console->comment("\nChecking system requirements");

        $this->process = new Process($this->console);
        $this->versionCheck();
        $this->extensionCheck();
        $this->hasDatabaseDriver();
        $this->disabledFunctionCheck();
        $this->requiredSystemCommands();
        $this->nodeJsCommand();
        $this->checkPermissions();
        if ($this->errors) {
            $this->console->line('');
            $this->console->block('Accio cannot be installed because your system doesn\'t meet minimal requirements. Please fix the errors above before retrying to install.');
            $this->console->line('');
        }
        return !$this->errors;
    }
192781
protected function checkScope($update = true)
    {
        $request = request();

        if ($update && $request->exists('scope')) {

            $this->activeScope = $request->get('scope');

            $this->markResetActivePage();
            $this->storeActiveScopeInSession();
        } else {
            $this->retrieveActiveScopeFromSession();
        }

        // Check if active is valid, reset it othwerwise
        if ($this->activeScope && ! $this->isValidScopeKey($this->activeScope)) {
            $this->activeScope = null;
            $this->storeActiveScopeInSession();
        }

        return $this;
    }
1272132
public function update($command = null)
    {
        $this->command = $this->instantiateCommand($command);

        $this->helper->downloadFiles();

        $this->countries->update();

        $this->currencies->update();

        $this->loadCountries();

        $this->states->update();

        $this->cities->update();

        $this->taxes->update();

        $this->timezones->update();

        $this->helper->deleteTemporaryFiles();
    }
588572
public function quarterback($updateCommand) {
        // Convert the command bus object into an array
        $data = (array) $updateCommand;


        // Sanitize
        $data = $this->sanitize($data, $this->type);


        // Process the featured image, including validating the featured image
        $featuredImageProcessing = $this->featuredImageProcessing->process($data);

        // Did the featured image validation fail?
        if ($featuredImageProcessing['validationMessage'] != "passed") {

            // Unlock the record
            $this->unlock($data['id']);

            // Prepare the response array, and then return to the edit form with error messages
            return $this->prepareResponseArray('validation_failed', 500, $data, $featuredImageProcessing['validationMessage']);
        }
        if ($featuredImageProcessing['validationMessage'] == "passed") {
            $data['featured_image'] = $featuredImageProcessing['featured_image'];
        }


        // Validate
        if ($this->validate($data, $this->type) != "passed")
        {
            // Unlock the record
            $this->unlock($data['id']);

            // Prepare the response array, and then return to the edit form with error messages
            return $this->prepareResponseArray('validation_failed', 500, $data, $this->validate($data, $this->type));
        }


        // Even though we already sanitized the data, we further "wash" the data
        $data = $this->wash($data);


        // UPDATE record
        if (!$this->persist($data, $this->type))
        {
            // Unlock the record
            $this->unlock($data['id']);

            // Prepare the response array, and then return to the edit form with error messages
            // Laravel's https://github.com/laravel/framework/blob/5.0/src/Illuminate/Database/Eloquent/Model.php
            //  does not prepare a MessageBag object, so we'll whip up an error message in the
            //  originating controller
            return $this->prepareResponseArray('persist_failed', 500, $data);
        }


        // Unlock the record
        $this->unlock($data['id']);


        // Prepare the response array, and then return to the command
        return $this->prepareResponseArray('update_successful', 200, $data);


        ///////////////////////////////////////////////////////////////////
        ///     NO EVENTS ARE SPECIFIED IN THE BASE FORM PROCESSING     ///
        ///////////////////////////////////////////////////////////////////

    }
713159
public function printUpdates($updates) {
    /**
     * @var string $method_name
     * @var Update $update
     */
    foreach ($updates as $method_name => $update) {
      $this->output->writeln(" - $method_name: {$update->description}");
    }
    $this->output->writeln('');
  }
938141
public function update(SQLStatement $update): string
    {
        $joins = $this->handleJoins($update->getJoins());
        $tables = $update->getTables();

        if ($joins !== '') {
            $joins = ' FROM ' . $this->handleTables($tables) . ' ' . $joins;
            $tables = array_values($tables);
        }

        $sql = 'UPDATE ';
        $sql .= $this->handleTables($tables);
        $sql .= $this->handleSetColumns($update->getColumns());
        $sql .= $joins;
        $sql .= $this->handleWheres($update->getWheres());

        return $sql;
    }
87574
public function checkUpdatesSettings()
    {
        $ret = true;
        foreach ($this->_updates as $update) {
            $e = false;
            try {
                $update->checkSettings();
            } catch (Exception $e) {
                throw $e; //no special handling for now, maybe something better should be done
                $ret = false;
            }
        }
        return $ret;
    }
16836
public function isUpdate($update = true, $where = null)
    {
        if (is_bool($update)) {
            $this->exists = $update;

            if (!empty($where)) {
                $this->updateWhere = $where;
            }
        } else {
            $this->exists      = true;
            $this->updateWhere = $update;
        }

        return $this;
    }
899439
public function allow_dev_auto_core_updates( $update ) {
		if ( ! apply_filters( 'Boldgrid\Library\Update\isEnalbed', false ) ) {
			return $update;
		}

		return $update || ! empty( $this->settings['wpcore']['all'] ) ||
			! empty( $this->settings['wpcore']['dev'] );
	}
545472
function update(value, spec) {
  invariant(
    typeof spec === 'object',
    'update(): You provided a key path to update() that did not contain one ' +
      'of %s. Did you forget to include {%s: ...}?',
    ALL_COMMANDS_LIST.join(', '),
    COMMAND_SET
  );

  if (hasOwnProperty.call(spec, COMMAND_SET)) {
    invariant(
      Object.keys(spec).length === 1,
      'Cannot have more than one key in an object with %s',
      COMMAND_SET
    );

    return spec[COMMAND_SET];
  }

  var nextValue = shallowCopy(value);

  if (hasOwnProperty.call(spec, COMMAND_MERGE)) {
    var mergeObj = spec[COMMAND_MERGE];
    invariant(
      mergeObj && typeof mergeObj === 'object',
      "update(): %s expects a spec of type 'object'; got %s",
      COMMAND_MERGE,
      mergeObj
    );
    invariant(
      nextValue && typeof nextValue === 'object',
      "update(): %s expects a target of type 'object'; got %s",
      COMMAND_MERGE,
      nextValue
    );
    _assign(nextValue, spec[COMMAND_MERGE]);
  }

  if (hasOwnProperty.call(spec, COMMAND_PUSH)) {
    invariantArrayCase(value, spec, COMMAND_PUSH);
    spec[COMMAND_PUSH].forEach(function(item) {
      nextValue.push(item);
    });
  }

  if (hasOwnProperty.call(spec, COMMAND_UNSHIFT)) {
    invariantArrayCase(value, spec, COMMAND_UNSHIFT);
    spec[COMMAND_UNSHIFT].forEach(function(item) {
      nextValue.unshift(item);
    });
  }

  if (hasOwnProperty.call(spec, COMMAND_SPLICE)) {
    invariant(
      Array.isArray(value),
      'Expected %s target to be an array; got %s',
      COMMAND_SPLICE,
      value
    );
    invariant(
      Array.isArray(spec[COMMAND_SPLICE]),
      'update(): expected spec of %s to be an array of arrays; got %s. ' +
        'Did you forget to wrap your parameters in an array?',
      COMMAND_SPLICE,
      spec[COMMAND_SPLICE]
    );
    spec[COMMAND_SPLICE].forEach(function(args) {
      invariant(
        Array.isArray(args),
        'update(): expected spec of %s to be an array of arrays; got %s. ' +
          'Did you forget to wrap your parameters in an array?',
        COMMAND_SPLICE,
        spec[COMMAND_SPLICE]
      );
      nextValue.splice.apply(nextValue, args);
    });
  }

  if (hasOwnProperty.call(spec, COMMAND_APPLY)) {
    invariant(
      typeof spec[COMMAND_APPLY] === 'function',
      'update(): expected spec of %s to be a function; got %s.',
      COMMAND_APPLY,
      spec[COMMAND_APPLY]
    );
    nextValue = spec[COMMAND_APPLY](nextValue);
  }

  for (var k in spec) {
    if (!(ALL_COMMANDS_SET.hasOwnProperty(k) && ALL_COMMANDS_SET[k])) {
      nextValue[k] = update(value[k], spec[k]);
    }
  }

  return nextValue;
}
382036
protected function _should_update( $current_version, $remote_version ) {
		return version_compare(
			$this->_sanitize_version( $current_version ),
			$this->_sanitize_version( $remote_version ),
			'<'
		);
	}
983799
public function fireUpdatingCommand(Command $command)
    {
        $this->handleMainCommand($command);

        event(new SystemWasUpdatedEvent());

        $command->info('System was updated!');
    }
36704
public function handle(UpdateConfigCommand $command)
    {
        foreach ($command->values as $setting => $value) {
            $this->writeEnv($setting, $value);
        }
    }
799688
public function update()
	{
		$package = $this->arguments->getOpt('package');
		if (empty($package))
		{
			$this->output->error('A package name is required');
		}

		Composer::updatePackage($package);
		$this->output->addLine("Done. $package updated to latest version");
	}
6605
public function update(SQLStatement $update): string
    {
        $sql = 'UPDATE ';
        $sql .= $this->handleTables($update->getTables());
        $sql .= $this->handleJoins($update->getJoins());
        $sql .= $this->handleSetColumns($update->getColumns());
        $sql .= $this->handleWheres($update->getWheres());

        return $sql;
    }
94121
public function process(Smarty_Internal_Template $_template, $update = false)
    {
        if ($this->handler->process($_template, $this, $update) === false) {
            $this->valid = false;
        }
        if ($this->valid) {
            $this->processed = true;
        } else {
            $this->processed = false;
        }
    }