Process this single bootstrapping step.

@param BootstrapState $state Contextual state to pass into the step.

@return BootstrapState Modified state to pass to the next step.
338962
public function process( BootstrapState $state ) {
		if ( ! class_exists( 'WP_CLI\Autoloader' ) ) {
			require_once WP_CLI_ROOT . '/php/WP_CLI/Autoloader.php';
		}

		$autoloader = new Autoloader();

		$mappings = [
			'WP_CLI'                   => WP_CLI_ROOT . '/php/WP_CLI',
			'cli'                      => WP_CLI_VENDOR_DIR . '/wp-cli/php-cli-tools/lib/cli',
			'Requests'                 => WP_CLI_VENDOR_DIR . '/rmccue/requests/library/Requests',
			'Symfony\Component\Finder' => WP_CLI_VENDOR_DIR . '/symfony/finder/',
		];

		foreach ( $mappings as $namespace => $folder ) {
			$autoloader->add_namespace(
				$namespace,
				$folder
			);
		}

		include_once WP_CLI_VENDOR_DIR . '/rmccue/requests/library/Requests.php';
		include_once WP_CLI_VENDOR_DIR . '/wp-cli/mustangostang-spyc/Spyc.php';

		$autoloader->register();

		return $state;
	}
929890
public function getState($state, $default = NULL)
    {
        $state = isset($this->states[$state]) ? $this->states[$state] : $default;
        return $state;
    }
885722
public function setState($state = null)
        {
            if (null === $state) {
                $this->_state = $state;
                return $this;
            }

            if (in_array($state, array(static::STATE_SUCCESS, static::STATE_ERROR, static::STATE_INFO))) {
                $this->_state = $state;
            }

            return $this;
        }
1006485
function setState($state) {
		if($state == (self::SMOKE_DETECTOR_STATE_SMOKE_ALARM_ON or self::SMOKE_DETECTOR_STATE_SMOKE_ALARM_OFF))
			$this->state = $state;
		else
			throw new \Exception('Invalid SmokeDetectorSensor state "'.$state.'"');
	}
518514
public static function formatState($state)
    {
        return isset(self::$stateNames[$state]) ? self::$stateNames[$state] : $state;
    }
1265908
function restore($state=1) {
		$fw=Base::instance();
		if ($this->flag && is_file($file=($path=$fw->get('TEMP').
			$fw->hash($fw->get('ROOT').$fw->get('BASE')).'.'.
			$fw->hash($this->file).'-').$state.'.png')) {
			if (is_resource($this->data))
				imagedestroy($this->data);
			$this->data=imagecreatefromstring($fw->read($file));
			imagesavealpha($this->data,TRUE);
			foreach (glob($path.'*.png',GLOB_NOSORT) as $match)
				if (preg_match('/-(\d+)\.png/',$match,$parts) &&
					$parts[1]>$state)
					@unlink($match);
			$this->count=$state;
		}
		return $this;
	}
88629
public function edit(State $state)
    {
        $countryOptions = $this->_getCountryOptions();
        return view('avored-framework::system.state.edit')
            ->with('model', $state)
            ->with('countryOptions', $countryOptions);
        ;
    }
1087120
public function setState($state)
    {
        if (!empty($state) && is_string($state) && ctype_print($state)) {
            $this->state = trim($state);
        }

        return $this;
    }
283942
protected function _setState($state)
    {
        if ($state !== null && !is_string($state) && !($state instanceof Stringable)) {
            throw $this->_createInvalidArgumentException(
                $this->__('Argument is not a valid state'),
                null,
                null,
                $state
            );
        }

        $this->state = $state;
    }
1284609
public function pushState($state)
		{
		$r = array_push($this->states, $state);
		$this->state = $this->states[count($this->states) - 1];
		return $r;
		}
679384
public function execute(ProcessState $state)
    {
        $input = $state->getInput();
        $options = $this->getOptions($state);
        if (\is_array($input)) {
            if (!array_key_exists('id', $input)) {
                throw new \UnexpectedValueException('Expecting an array with the "id" key');
            }
            $input = $input['id'];
        }

        /** @var FamilyInterface $family */
        $family = $options['family'];
        /** @var DataRepository $repository */
        $repository = $this->entityManager->getRepository($family->getDataClass());
        $data = $repository->find($input);

        if (!$data instanceof DataInterface) {
            throw new \UnexpectedValueException("Data not found for id '{$input}'");
        }
        if ($data instanceof ContextualDataInterface && null !== $options['context']) {
            $data->setCurrentContext($options['context']);
        }
        $this->dataLoader->loadSingle($data, $options['load_depth']);

        $state->setOutput($data);
    }
461452
public function addState(StateInterface $state): self
    {
        $builder = clone $this;
        $builder->states[$state->getName()] = $state;
        return $builder;
    }
648367
protected function checkState(string $state = null):void{

		if(empty($state) || !$this->storage->hasCSRFState($this->serviceName)){
			throw new ProviderException('invalid state for '.$this->serviceName);
		}

		$knownState = $this->storage->getCSRFState($this->serviceName);

		if(!hash_equals($knownState, $state)){
			throw new ProviderException('invalid CSRF state: '.$this->serviceName.' '.$state);
		}

	}
197484
protected function changeState($state)
    {
        $currState = $this->_poolClientState;
        //Save previous state
        if (isset($currState) && $currState !== PoolClientInterface::CLIENT_POOL_STATE_LOCKED) {
            $this->_poolClientStatePrev = $currState;
        }
        $this->_poolClientState = $state;
        $this->emit(PoolClientInterface::CLIENT_POOL_EVENT_CHANGE_STATE, [$state]);
    }
998662
private function pushCallerStatedClassName(StateInterface $state): ProxyInterface
    {
        $stateClass = \get_class($state);

        if (!isset($this->classesByStates[$stateClass])) {
            throw new \RuntimeException("Error, no original class name defined for $stateClass");
        }

        $this->callerStatedClassesStack->push($this->classesByStates[$stateClass]);

        return $this;
    }
936176
protected function shift($state)
    {
        $this->states[] = $state;
        $this->stack[] = array_shift($this->queue);
        $this->current = null;
    }
867195
public function setState(?string $state): Webhook
    {
        if (null !== $state) {
            Assert::oneOf($state, self::VALID_STATES);

            $this->state = $state;
        }

        return $this;
    }