Returns session key to use for storing information about the model (listing).

This is used as the 'context' by the list memory.

@param string|null $modelSlug    defaults to current model
@return string
182302
protected function getModelSessionKey($modelSlug = null)
    {
        $modelSlug = (null === $modelSlug) ? $this->getModelSlug() : $modelSlug;

        return $this->core->config('session.prefix')
             . 'model:' . $modelSlug;
    }
676524
public Object getCache(ModelKey modelKey) {
		String modelClassName = null;
		if (modelKey.getModelClass() == null) {
			ModelMapping modelMapping = this.modelFactory.getModelMapping(modelKey.getFormName());
			modelClassName = modelMapping.getClassName();
		} else
			modelClassName = modelKey.getModelClass().getName();
		return modelCacheManager.getCache(modelKey.getDataKey(), modelClassName);

	}
1298339
protected function getSSLBuilder($config)
    {
        if (empty($config)) {
            return null;
        }

        $ssl = \Cassandra::ssl();
        $serverCert = array_get($config, 'server_cert_path');
        $clientCert = array_get($config, 'client_cert_path');
        $privateKey = array_get($config, 'private_key_path');
        $passPhrase = array_get($config, 'key_pass_phrase');

        if (!empty($serverCert) && !empty($clientCert)) {
            if (empty($privateKey)) {
                throw new InternalServerErrorException('No private key provider.');
            }

            return $ssl->withVerifyFlags(\Cassandra::VERIFY_PEER_CERT)
                ->withTrustedCerts($serverCert)
                ->withClientCert($clientCert)
                ->withPrivateKey($privateKey, $passPhrase)
                ->build();
        } elseif (!empty($serverCert)) {
            return $ssl->withVerifyFlags(\Cassandra::VERIFY_PEER_CERT)
                ->withTrustedCerts(getenv('SERVER_CERT'))
                ->build();
        } elseif (true === boolval(array_get($config, 'ssl', array_get($config, 'tls', false)))) {
            return $ssl->withVerifyFlags(\Cassandra::VERIFY_NONE)
                ->build();
        } else {
            return null;
        }
    }
685982
public function getBySlug($sSlug)
    {
        foreach ($this->aComponents as $oComponent) {
            if ($sSlug == $oComponent->slug) {
                return $oComponent;
            }
        }

        return null;
    }
673136
protected function getTerm($taxonomySlug, $termSlug)
    {
        $taxonomy = $this->taxonomyRepository->findOneBy(['uri' => $taxonomySlug]);

        return $this->termRepository->findOneBy(
            [
                'taxonomy' => $taxonomy,
                'slug'     => $termSlug,
            ]
        );
    }
35765
public function joinSlug($modelName, $tableName)
    {
        if ($this->_aliasIsJoined === false) {
            $subSql = 'SELECT ' . SeoSlug::tableName() . '.*
    	FROM ' . SeoSlug::tableName() . '
      	JOIN (
			SELECT ' . SeoSlug::tableName() . '.model_id, MAX(id) AS max_id
           	FROM ' . SeoSlug::tableName() . '
           	WHERE ' . SeoSlug::tableName() . '.model = ' . Yii::$app->db->quoteValue($modelName) . '
            GROUP BY ' . SeoSlug::tableName() . '.model_id
		) as sel ON ' . SeoSlug::tableName() . '.model_id = sel.model_id AND ' . SeoSlug::tableName() . '.id = sel.max_id';
            $sql = '(' . $subSql . ') as ' . SeoSlug::tableName() . '';
            $this->leftJoin($sql, $tableName . '.id = ' . SeoSlug::tableName() . '.model_id');
            $this->_aliasIsJoined = true;
        }
        return $this;
    }
898174
protected function getKeys(array $models, $key = null)
    {
        return collect($models)->map(function ($value) use ($key) {
            return $key ? $value->getAttribute($key) : $value->getKey();
        })->values()->unique(null, true)->sort()->all();
    }
958764
public function getAuthKey()
    {
        $authKeyAttribute = $this->authKeyAttribute;
        return (is_string($authKeyAttribute) && !empty($authKeyAttribute)) ? $this->$authKeyAttribute : null;
    }
610879
public function get(...$args)
    {
        $record = $this->fetchSingle($args);
        if (!$record)
            return null;
        $obj = new $this->model_class;
        $obj->assignRecord($record, $this->db);
        return $obj;
    }
976581
protected function getPrimaryKey($data)
    {
        if ($this->grid->dataProvider instanceof CActiveDataProvider) {
            $key = $this->grid->dataProvider->keyAttribute === null ? $data->getPrimaryKey(
            ) : $data->{$this->keyAttribute};
            return is_array($key) ? implode(',', $key) : $key;
        }
        if ($this->grid->dataProvider instanceof CArrayDataProvider || $this->grid->dataProvider instanceof CSqlDataProvider)
            return is_object(
                $data
            ) ? $data->{$this->grid->dataProvider->keyField} : $data[$this->grid->dataProvider->keyField];

        return null;
    }
527935
public function getTableName(
        string $modelEntity,
        string $connectionName = ResourceConnection::DEFAULT_CONNECTION
    ): string {
        return $this->resourceConnection->getTableName($modelEntity, $connectionName);
    }
418645
@Override
    public byte[] getUserSessionKey ( CIFSContext tc, byte[] chlng ) {
        if ( this.hashesExternal ) {
            return null;
        }
        return super.getUserSessionKey(tc, chlng);
    }
868793
public function getSessionKey(): ?string
    {
        $cacheKey = 'sessionkey';
        if (!isset(self::$cache[$cacheKey])) {
            $cookies = Internal\Cookies::getList(Internal\Cookies::TYPE_SERVER);
            $cookieKey = '_s';
            $key = isset($cookies[$cookieKey]) ? (string) $cookies[$cookieKey] : '';
            self::$cache[$cacheKey] = strlen((string) $key) > 70 ? $key : null;
        }
        return self::$cache[$cacheKey];
    }
884269
protected function getElementObject($sElementSlug)
    {
        if (empty($sElementSlug)) {
            return null;
        }

        if ($this->isSlugTranslatable()) {
            $obElement = PromoBlock::active()->transWhere('slug', $sElementSlug)->first();
            if (!$this->checkTransSlug($obElement, $sElementSlug)) {
                $obElement = null;
            }
        } else {
            $obElement = PromoBlock::active()->getBySlug($sElementSlug)->first();
        }

        if (!empty($obElement)) {
            Event::fire('shopaholic.promo_block.open', [$obElement]);
        }

        return $obElement;
    }
919022
private function getKey(string $id = null) : string
    {
        $id = $id ?: session_id();
        return sprintf('%s/session/%s', session_name(), $id);
    }
596269
protected function _getSchemaForModel($modelName = null) {
		if (empty($modelName)) {
			return null;
		}

		$modelName = (string)$modelName;
		$cached = $this->_getSchemaCache($modelName);
		if ($cached !== null) {
			return $cached;
		}

		$modelObj = ClassRegistry::init($modelName, true);
		if ($modelObj === false) {
			return null;
		}

		$defaultSchema = [
			'type' => 'string',
			'null' => false,
			'default' => null,
			'length' => null,
		];
		$result = $modelObj->schema();
		$virtualFields = $modelObj->getVirtualField();
		if (!empty($result) && !empty($virtualFields)) {
			foreach ($virtualFields as $virtualFieldName => $virtualFieldValue) {
				$result[$virtualFieldName] = $defaultSchema;
			}
		}
		$this->_setSchemaCache($modelName, $result);

		return $result;
	}
764119
protected function getSessionKey()
	{
		return self::SESSION_VAR_PREFIX . Yii::app()->getId() . '.' . $this->getController()->getUniqueId() . '.' . $this->getId();
	}