Get complement state.

@uses \Eliasis\Framework\App::complements()
@uses \Eliasis\Complement\Traits\ComplementHandler::getType()

@return string → complement state
517216
public function getState()
    {
        if (isset($this->states['state'])) {
            return $this->states['state'];
        } elseif (isset($this->complement['state'])) {
            return $this->complement['state'];
        }

        $type = self::getType();

        return self::$defaultStates[$type];
    }
464502
public static function getEnum()
    {
        $enumClass = get_called_class();

        if (!isset(self::$ConstantsCache[$enumClass])) {
            $reflect = new \ReflectionClass($enumClass);
            self::$ConstantsCache[$enumClass] = $reflect->getConstants();
        }

        return self::$ConstantsCache[$enumClass];
    }
567316
protected function _getStateObject()
    {
        if (is_null($this->_oStateObject)) {
            $this->_oStateObject = oxNew(\OxidEsales\Eshop\Application\Model\State::class);
        }

        return $this->_oStateObject;
    }
1348621
public function getEncType()
    {
        if ($this->encType) {
            return $this->encType;
        }

        if ($fields = $this->fields->dataFields()) {
            foreach ($fields as $field) {
                if ($field instanceof FileField) {
                    return self::ENC_TYPE_MULTIPART;
                }
            }
        }

        return self::ENC_TYPE_URLENCODED;
    }
1264517
public function getReturnType()
    {
        $isBuiltin  = false;
        $returnType = $this->functionLikeNode->getReturnType();
        $isNullable = $returnType instanceof NullableType;

        if ($isNullable) {
            $returnType = $returnType->type;
        }
        if ($returnType instanceof Identifier) {
            $isBuiltin = true;
            $returnType = $returnType->toString();
        } elseif (is_object($returnType)) {
            $returnType = $returnType->toString();
        } elseif (is_string($returnType)) {
            $isBuiltin = true;
        } else {
            return null;
        }

        return new ReflectionType($returnType, $isNullable, $isBuiltin);
    }
809058
public function getUpdateType()
    {
        $update = $this->data;
        if (isset($update['inline_query'])) {
            return self::INLINE_QUERY;
        }
        if (isset($update['callback_query'])) {
            return self::CALLBACK_QUERY;
        }
        if (isset($update['edited_message'])) {
            return self::EDITED_MESSAGE;
        }
        if (isset($update['message']['text'])) {
            return self::MESSAGE;
        }
        if (isset($update['message']['photo'])) {
            return self::PHOTO;
        }
        if (isset($update['message']['video'])) {
            return self::VIDEO;
        }
        if (isset($update['message']['audio'])) {
            return self::AUDIO;
        }
        if (isset($update['message']['voice'])) {
            return self::VOICE;
        }
        if (isset($update['message']['contact'])) {
            return self::CONTACT;
        }
        if (isset($update['message']['location'])) {
            return self::LOCATION;
        }
        if (isset($update['message']['reply_to_message'])) {
            return self::REPLY;
        }
        if (isset($update['message']['animation'])) {
            return self::ANIMATION;
        }
        if (isset($update['message']['document'])) {
            return self::DOCUMENT;
        }
        if (isset($update['channel_post'])) {
            return self::CHANNEL_POST;
        }

        return false;
    }
307874
public function getMutualType()
    {
        $btAttribute = $this->mutualTypeAttribute;
        if (is_string($btAttribute) && !empty($btAttribute)) {
            return $this->$btAttribute;
        }
        return static::$mutualTypeNormal;
    }
1280872
public function popState()
		{
		$r = array_pop($this->states);
		$this->state = $this->states[count($this->states) - 1];
		return $r;
		}
189026
public function getType()
    {
        if (isset($this->result[0]['type'])) {
            $error = $this->result[0]['type'];
            if (is_string($error)) {
                return $error;
            }
        }

        return 'NewscoopApiException';
    }
23770
public function ConditionalFactor()
    {
        $not = false;

        if ($this->lexer->isNextToken(Lexer::T_NOT)) {
            $this->match(Lexer::T_NOT);

            $not = true;
        }

        $conditionalPrimary = $this->ConditionalPrimary();

        // Phase 1 AST optimization: Prevent AST\ConditionalFactor
        // if only one AST\ConditionalPrimary is defined
        if (! $not) {
            return $conditionalPrimary;
        }

        $conditionalFactor      = new AST\ConditionalFactor($conditionalPrimary);
        $conditionalFactor->not = $not;

        return $conditionalFactor;
    }
514333
public function getTypeHint()
    {
        $typeHint = $this->node->type;
        if ($typeHint instanceof Node\Name) {
            $typeHint = (string) $typeHint;
        }
        return $typeHint;
    }
771045
public function getType()
    {
        $class = get_class($this);

        if (strpos($class, 'CoreBundle\Entity\Operation') !== false) {
            return self::TYPE_OPERATION;
        }
        if (strpos($class, 'CoreBundle\Entity\Activity') !== false) {
            return self::TYPE_ACTIVITY;
        }
        if (strpos($class, 'CoreBundle\Entity\Milestone') !== false) {
            return self::TYPE_MILESTONE;
        }
        if (strpos($class, 'CoreBundle\Entity\Campaign') !== false) {
            return self::TYPE_CAMPAIGN;
        }

        return false;
    }
640454
protected static function getInstance()
    {
        $type = self::getType();
        $appID = App::getCurrentID();
        $complementID = self::getCurrentID();
        $complement = get_called_class();
        if (! isset(self::$instances[$appID][$type][$complementID])) {
            self::$instances[$appID][$type][$complementID] = new $complement();
        }

        return self::$instances[$appID][$type][$complementID];
    }
455219
function getType()
    {
        if($this->_type) {
            return $this->_type;
        }
        else {
            $myclass = get_class($this);
            return strtolower(substr($myclass, strrpos($myclass, '\\') + 1, -5));
        }
    }
1173032
public function getTypeDoctrine()
    {
        if (isset(self::$doctrineTypeMap[$this->getType()])) {
            return self::$doctrineTypeMap[$this->getType()];
        }

        // our fallback default
        return self::$doctrineTypeMap[self::TYPE_STRING];
    }
562756
protected function getState()
    {
        $serviceService = $this->getServiceLocator()->get(StateStorage::SERVICE_ID);
        $userUri = $this->getSession()->getUserUri();
        return is_null($userUri) ? null : $serviceService->get($userUri, $this->getServiceCallId());
    }
1370614
protected function getState()
    {
        $data = [];
        foreach ($this->serialisedProperties as $property) {
            $data[$property] = $this->$property;
        }
        return $data;
    }