@todo remove this some versions after 0.29

@param object|string $state

@return bool
341766
public function is($state)
    {
        if (!$this->state) {
            $this->state = $this->name;
        }

        return parent::is($state);
    }
936222
public function variantStateExcluded($state)
    {
        foreach ($this->excludedVariantStates as $excludedstate) {
            $matches = true;

            foreach ($excludedstate as $variant => $variantstate) {
                if (!isset($state[$variant]) || $state[$variant] != $variantstate) {
                    $matches = false;
                    break;
                }
            }

            if ($matches) {
                return true;
            }
        }
    }
250798
public boolean isState(Class<? extends State> state)
    {
        if (current != null)
        {
            return current.getClass().equals(state);
        }
        return false;
    }
891421
protected function setState(int $state) : bool
    {
        $this->workerState = $state;

        // report idle state to server:
        $this->replySocket->send(json_encode([
            'request' => 'change_state',
            'worker_id' => $this->workerId,
            'state' => $this->workerState
        ]));
        $response = $this->replySocket->recv();
        return ($response === 'ok');
    }
621208
public function setUpgrade($state = false)
	{
		$tmp = $this->upgrade;

		if ($state)
		{
			$this->upgrade = true;
		}
		else
		{
			$this->upgrade = false;
		}

		return $tmp;
	}
857940
protected function hasInvalidState()
    {
        if ($this->isStateless()) {
            return false;
        }
        $state = $this->getSessionData('Socialite.state');
        return !(strlen($state) > 0 && A::get($this->request->getQueryParams(), 'state') === $state);
    }
914093
public function setState($state)
    {
        if (!isset($this->_states[$state])) {
            include_once 'Zend/Search/Exception.php';
            throw new Zend_Search_Exception('State \'' . $state . '\' is not on of the possible FSM states.');
        }

        $this->_currentState = $state;
    }
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);
		}

	}
797509
private function stateChanged($states)
    {
        $appID = App::getCurrentID();
        $complementID = self::getCurrentID();

        if (isset($states[$appID][$complementID])) {
            $actualStates = $states[$appID][$complementID];

            if (! count(array_diff_assoc($actualStates, $this->states))) {
                return false;
            }
        }

        return true;
    }
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]);
    }
1122264
public function setState($state)
		{
		$r = array_pop($this->states);
		array_push($this->states, $state);
		$this->state = $this->states[count($this->states) - 1];
		return $r;
		}
531103
public function isPlatformReady(MaintenanceState $state = null)
    {
        if (is_null($state)) {
            $state = $this->getPlatformState();
        }
        return ($state->getBooleanStatus() === true);
    }
585527
protected function setState($state)
    {
        $serviceService = $this->getServiceLocator()->get(StateStorage::SERVICE_ID);
        $userUri = $this->getSession()->getUserUri();
        return is_null($userUri) ? false : $serviceService->set($userUri, $this->getServiceCallId(), $state);
    }
194042
protected function isRedirectState($state)
	{
		$state = (int) $state;

		return $state > 299 && $state < 400 && array_key_exists($state, $this->responseMap);
	}
217962
public function setState($int)
    {
        if (Daemon::$compatMode) {
            return true;
        }
        if (!$this->id) {
            return false;
        }

        if (Daemon::$config->logworkersetstate->value) {
            $this->log('state is ' . Daemon::$wstateRev[$int]);
        }

        $this->state = $int;

        if ($this->reload) {
            $int += 100;
        }
        Daemon::$shm_wstate->write(chr($int), $this->id - 1);
        return true;
    }
926529
public function setState($state)
    {
        $state = (int) $state;
        if ($this->isRoot() && !($state & Page::STATE_ONLINE)) {
            throw new \LogicException("Root page state must be online.");
        }

        if (!$this->isOnline() && (self::STATE_ONLINE & $state) && !$this->isRoot() && !$this->getPublishing()) {
            $this->setPublishing(new \DateTime());
        }

        $this->_state = $state;

        return $this;
    }
947738
public function setState($state)
    {
        $oldState = $this->getState();

        if ($oldState === $state) {
            return $this;
        }

        $this->getLogger()->debug('Changing state from: '.$oldState.' to: '.$state.'.');
        $this->state = $state;

        return $this;
    }