Gets the state storage.

@return \Drupal\Core\State\StateInterface
The state storage.
512360
public function getState() {
    if (empty($this->state)) {
      $this->state = \Drupal::service('state');
    }
    return $this->state;
  }
704049
protected function getStorageTypeObject()
    {
        $type = $this->getStorageType();
        if (is_string($type)) {
            $type = Type::getType($type);
        }

        return $type;
    }
760234
public function getStates()
    {
        $appID = App::getCurrentID();
        $complementID = self::getCurrentID();
        $states = $this->getStatesFromFile();

        if (isset($states[$appID][$complementID])) {
            return $this->states = $states[$appID][$complementID];
        }

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

        return $this->_oStateObject;
    }
1162226
public function getPlatformState()
    {
        try {
            return $this->getStorage()->getCurrentPlatformState();
        } catch (\common_exception_NotFound $e) {
            $this->enablePlatform();
            return new MaintenanceState(
                array(MaintenanceState::STATUS => MaintenanceState::LIVE_MODE)
            );
        }
    }
1292421
public function retrieveState($name = null)
    {
        $key = $this->generateKey(self::STATE_KEY);
        $state = self::storage()->get($key, []);
        if ($name !== null) {
            return isset($state[$name]) ? $state[$name] : null;
        }

        return $state;
    }
79383
public function getFileSystem()
    {
        if (! $this->storage) {
            $this->storage = $this->getServiceLocator()->get(PortableElementFileStorage::SERVICE_ID);
            $this->storage->setServiceLocator($this->getServiceLocator());
            $this->storage->setModel($this->getModel());
        }
        return $this->storage;
    }
783664
final protected function getData()
    {
        if ($this->storage->has($this->ns)) {
            return $this->storage->get($this->ns);
        } else {
            // If can't find in storage, then return default
            return $this->default;
        }
    }
664283
public function getCache()
    {
        $data = $this->memcache->get(
            $this->config['key_prefix'] .
            '.storage'
        );
        $this->isCached = !empty($data);

        return $data;
    }
703847
public function storage(StorageInterface $storage = null)
    {
        if ($storage !== null) {
            $this->_storage = $storage;

            return null;
        }

        if ($this->_storage) {
            return $this->_storage;
        }

        $config = $this->_config['storage'];
        if (is_string($config)) {
            $class = $config;
            $config = [];
        } else {
            $class = $config['className'];
            unset($config['className']);
        }
        $className = App::className($class, 'Auth/Storage', 'Storage');
        if (!class_exists($className)) {
            throw new Exception(sprintf('Auth storage adapter "%s" was not found.', $class));
        }
        $request = $this->getController()->getRequest();
        $response = $this->getController()->getResponse();
        $this->_storage = new $className($request, $response, $config);

        return $this->_storage;
    }
833740
public function obj()
    {
        if ($this->obj === null) {
            $this->obj = $this->createOrLoadObj();

            if ($this->obj instanceof ModelInterface) {
                $this->objId = $this->obj->id();
            } else {
                $this->objId = null;
            }
        }

        return $this->obj;
    }
772684
public function get()
    {
        self::$messages = $this->getSessionDriver()->get('_messages_', []);
        $messages = self::$messages;
        $this->flush();
        return $messages;
    }
781985
public static function get(){
        if(empty(self::$currentMode)){
            self::$currentMode = self::getCurrentMode();
        }
        return self::$currentMode;
    }
554979
public function getUser() {
        $token = null;
        if (null === $this->user) {
            $token = $this->getTokenStorage()->getToken();
        }
        if (null !== $token) {
            $this->user = $token->getUser();
        }
        if (true === ($this->user instanceof UserInterface)) {
            return $this->user;
        }
        return null;
    }
974215
public function getUrl()
    {
        if($this->storage)
        {
            $this->save();

            return $this->storage->getUrl($this);
        }

        return NULL;
    }
311737
public function returnFullDataStorage() {

        $aStorage = $this->getSNMP()->realWalk1d(self::OID_STORAGE);

        $aReturn = Array();
        $aReturn['memory_size'] = $aStorage[self::OID_STORAGE_MEMORY_SIZE][0];


        $aReturn['index'] = $aStorage[self::OID_STORAGE_INDEX];
        $aReturn['type'] = $aStorage[self::OID_STORAGE_TYPE];
        $aReturn['description'] = $aStorage[self::OID_STORAGE_DESCR];
        $aReturn['allocation_units'] = $aStorage[self::OID_STORAGE_ALLOCATION_UNITS];
        $aReturn['size'] = $aStorage[self::OID_STORAGE_SIZE];
        $aReturn['used'] = $aStorage[self::OID_STORAGE_USED];

        return $aReturn;
    }
160130
def get_storage(self):
        '''
        '''

        if self.storage:
            return self.storage
        self.storage = self.reconnect_redis()

        return self.storage