Retrieve Store Id

@return int|null
177960
public function getStoreId()
    {
        if (!$this->hasData('store_id')) {
            $this->setData('store_id', (int) $this->getRequest()->getParam($this->getStoreVarName()));
        }

        return $this->getData('store_id');
    }
629888
public function getID()
    {
        $idAttribute = $this->idAttribute;
        return (is_string($idAttribute) && !empty($idAttribute)) ? $this->$idAttribute : null;
    }
1145461
public function isStoreSelected(\Magento\Store\Model\Store $store)
    {
        return $this->getStoreId() !== null && (int) $this->getStoreId() === (int) $store->getId();
    }
555061
public function getViewId()
    {
        if (!isset($this->_sViewId)) {
            $this->_sViewId = parent::getViewId() . '|' . \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('oxcid');
        }

        return $this->_sViewId;
    }
741001
private function getDefaultStoreId()
    {
        $store = $this->storeManager->getDefaultStoreView();

        if (null === $store) {
            // Occurs when current user does not have access to default website (due to AdminGWS ACLS on Magento EE).
            $store = !empty($this->storeManager->getWebsites()) ? current($this->storeManager->getWebsites())->getDefaultStore() : null;
        }

        return $store ? $store->getId() : 0;
    }
213651
public static function getStore($key = null)
    {
        $ret = null;

        if ($key !== null) {
            if (isset(self::$store[$key])) {
                $ret = self::$store[$key];
            }
        } else {
            $ret = self::$store;
        }

        return $ret;
    }
1072198
public function getID()
    {
        if ($this->datos===null) {
            $this->datos = $this->toArray();
        }
        return !empty($this->datos['LibroCompraVenta']['EnvioLibro']['@attributes']['ID']) ? $this->datos['LibroCompraVenta']['EnvioLibro']['@attributes']['ID'] : false;
    }
230273
public final function getId(): ?int
    {
        $id = end($this->ids);

        return ($id !== false) ? $id : null;
    }
421576
private function getStore($storeId)
    {
        if (! isset($this->store)) {
            $this->store = $this->storeManager->getStore($storeId);
        }

        return $this->store;
    }
464989
private function getSystemUserId()
    {
        try {
            if (class_exists($class = '\Cartalyst\Sentry\Facades\Laravel\Sentry')
                    || class_exists($class = '\Cartalyst\Sentinel\Laravel\Facades\Sentinel')) {
                return ($class::check()) ? $class::getUser()->id : null;
            } elseif (\Auth::check()) {
                return \Auth::user()->getAuthIdentifier();
            }
        } catch (\Exception $e) {
            return null;
        }

        return null;
    }
1026529
public function getContactId()
    {
        if ($mtcId = $this->getInt(self::MTC_ID)) {
            return $mtcId;
        } elseif ($mauticSessionId = $this->getSessionId()) {
            return $this->getInt($mauticSessionId);
        }

        return null;
    }
1171506
public function id()
	{
		if ( $this->loggedOut )
			return null;

		$id = $this->session->get( $this->getName() );

		if ( is_null( $id ) && $this->acct() )
			$id = $this->acct()->getId();

		return $id;
	}
1241225
public function getInsertId(){
		$result = $this->runQuery("SELECT LASTVAL()");
		if(!$result)
			return false;

		$r = $this->fetch($result);
		return is_array($r) ? reset($r) : false;
	}
695494
protected function _getShippingId()
    {
        /** @var OxpsPaymorrowOxBasket|oxBasket $this */

        $sId = (string) $this->getShippingId();

        if ( !empty( $sId ) ) {
            $sId = $this->_toUtf( $sId );
        } else {
            $sId = 'shippingCosts';
        }

        return $sId;
    }
1151342
public static function id() {
		if (!empty(self::$override_tenant_id)) {
			return (int) self::$override_tenant_id;
		} else {
			$default_tenant_id = \Application::get('application.structure.tenant_default_id');
			if (!empty($default_tenant_id)) {
				return (int) $default_tenant_id;
			}
		}
		return (int) \Application::get('application.structure.settings.tenant.id');
	}
276120
private function getUserId()
    {
        $id = null;

        if (null !== $this->tokenStorage && null !== $this->tokenStorage->getToken()) {
            $user = $this->tokenStorage->getToken()->getUser();

            if ($user instanceof UserInterface) {
                $id = $user->getId();
            }
        }

        return $id;
    }
910694
public static function getReferenceId($reference, string $storeAs)
    {
        return $storeAs === self::REFERENCE_STORE_AS_ID ? $reference : $reference[self::getReferencePrefix($storeAs) . 'id'];
    }