Retrieve column information from ResultSetMapping.

@param string $key Column name

@return array|null
501303
protected function hydrateColumnInfo($key)
    {
        if (isset($this->_cache[$key])) {
            return $this->_cache[$key];
        }

        switch (true) {
            // NOTE: Most of the times it's a field mapping, so keep it first!!!
            case (isset($this->_rsm->fieldMappings[$key])):
                $classMetadata = $this->getClassMetadata($this->_rsm->declaringClasses[$key]);
                $fieldName     = $this->_rsm->fieldMappings[$key];
                $fieldMapping  = $classMetadata->fieldMappings[$fieldName];

                return $this->_cache[$key] = array(
                    'isIdentifier' => in_array($fieldName, $classMetadata->identifier),
                    'fieldName'    => $fieldName,
                    'type'         => Type::getType($fieldMapping['type']),
                    'dqlAlias'     => $this->_rsm->columnOwnerMap[$key],
                );

            case (isset($this->_rsm->newObjectMappings[$key])):
                // WARNING: A NEW object is also a scalar, so it must be declared before!
                $mapping = $this->_rsm->newObjectMappings[$key];

                return $this->_cache[$key] = array(
                    'isScalar'             => true,
                    'isNewObjectParameter' => true,
                    'fieldName'            => $this->_rsm->scalarMappings[$key],
                    'type'                 => Type::getType($this->_rsm->typeMappings[$key]),
                    'argIndex'             => $mapping['argIndex'],
                    'objIndex'             => $mapping['objIndex'],
                    'class'                => new \ReflectionClass($mapping['className']),
                );

            case (isset($this->_rsm->scalarMappings[$key])):
                return $this->_cache[$key] = array(
                    'isScalar'  => true,
                    'fieldName' => $this->_rsm->scalarMappings[$key],
                    'type'      => Type::getType($this->_rsm->typeMappings[$key]),
                );

            case (isset($this->_rsm->metaMappings[$key])):
                // Meta column (has meaning in relational schema only, i.e. foreign keys or discriminator columns).
                $fieldName     = $this->_rsm->metaMappings[$key];
                $dqlAlias      = $this->_rsm->columnOwnerMap[$key];
                $classMetadata = $this->getClassMetadata($this->_rsm->aliasMap[$dqlAlias]);
                $type          = isset($this->_rsm->typeMappings[$key])
                    ? Type::getType($this->_rsm->typeMappings[$key])
                    : null;

                return $this->_cache[$key] = array(
                    'isIdentifier' => isset($this->_rsm->isIdentifierColumn[$dqlAlias][$key]),
                    'isMetaColumn' => true,
                    'fieldName'    => $fieldName,
                    'type'         => $type,
                    'dqlAlias'     => $dqlAlias,
                );
        }

        // this column is a left over, maybe from a LIMIT query hack for example in Oracle or DB2
        // maybe from an additional column that has not been defined in a NativeQuery ResultSetMapping.
        return null;
    }
1298475
protected function getData($key = null)
    {
        if (null === $key) {
            return $this->getRedis()->hgetall($this->getRedisNamespace());
        }

        return $this->getRedis()->hget($this->getRedisNamespace(), $key);
    }
733707
public function get( $key )
	{
		$prefixed = $this->prefix . $key;

		$cache = $this->table()->where( 'key', '=', $prefixed )->first();

		// If we have a cache record we will check the expiration time against current
		// time on the system and see if the record has expired. If it has, we will
		// remove the records from the database table so it isn't returned again.
		if ( !is_null( $cache ) )
		{
			if ( is_array( $cache ) )
				$cache = (object) $cache;

			if ( time() >= $cache->expiration )
			{
				$this->forget( $key );

				return null;
			}

			return $this->encrypter->decrypt( $cache->value );
		}

		return null;
	}
766029
private function getProperty($key)
    {
        return array_key_exists($key, $this->fields) ? $this->fields[$key] : null;
    }
838674
public function getQueryParam($key)
    {
        if (isset($this->queryParams[$key])) {
            return $this->queryParams[$key];
        }
        return null;
    }
88383
public function get($key)
    {
        if (is_null($this->data)) {
            $this->data = $this->table->getColumn($this->name)->toArray();
        }

        return $this->data[$key];
    }
39216
public function getParameter($key)
    {
        $query = $this->getQuery();

        return isset($query[$key]) ? $query[$key] : null;
    }
933376
public function getInfo(string $key = null)
    {
        if ($this->info == null) {
            $resource = $this->linker->getLink()->getAgent()->getResource();
            $resourceType = $resource->getType();

            $serverVersion = $clientVersion = null;

            if ($resourceType == Resource::TYPE_MYSQL_LINK) {
                $object = $resource->getObject();
                foreach (get_class_vars(get_class($object)) as $var => $_) {
                    $this->info[$var] = $object->{$var};
                }
                $serverVersion = preg_replace('~\s*([^ ]+).*~', '\1', $object->server_info);
                $clientVersion = preg_replace('~(?:[a-z]+\s+)?([^ ]+).*~i', '\1', $object->client_info);
            } elseif ($resourceType == Resource::TYPE_PGSQL_LINK) {
                $this->info = pg_version($resource->getObject());
                $serverVersion = preg_replace('~\s*([^ ]+).*~', '\1', $this->info['server']);
                $clientVersion = preg_replace('~\s*([^ ]+).*~', '\1', $this->info['client']);
            }

            $this->info['serverVersion'] = $serverVersion;
            $this->info['clientVersion'] = $clientVersion;
        }

        return ($key == null) ? $this->info : $this->info[$key] ?? null;
    }
446020
public function getInfo( $key = NULL )
	{
		if( !$this->info )
			throw new RuntimeException( "No Request has been sent, yet." );
		if( !$key )
			return $this->info;
		if( !array_key_exists( $key, $this->info ) )
			throw new InvalidArgumentException( 'Status Key "'.$key.'" is invalid.' );
		return $this->info[$key];
	}
138350
public function lists($column, $key = null)
	{
		$columns = $this->getListSelect($column, $key);

		$results = new Collection($this->get($columns));

		return $results->lists($columns[0], array_get($columns, 1));
	}
23199
protected function retrieve($key)
    {
        $value = dba_fetch($key, $this->dba);

        if (false === $value) {
            return null;
        }

        // compare the timestamp to the current time when we read the value.
        if (time() >= substr($value, 0, 10)) {
            $this->forget($key);
            return null;
        }

        return unserialize(substr($value, 10));
    }
713835
public function getValue($key)
    {
        if (!isset($this->values[$key])) {
            return null;
        }
        return $this->values[$key];
    }
1201056
private function fetch($key)
    {
        $keyExp = explode('.', $key);

        if ($this->cache->has($key))
        {
            return $this->cache->get($key);
        }


        $row = $this->database
            ->table($this->config['db_table'])
            ->where('setting_key', $keyExp[0])
            ->first(['setting_value']);

        if ( ! is_null($row))
        {
            $setting_value = json_decode($row->setting_value, true);
            $value         = set_nested_array_value($setting_value, $keyExp);

            return $this->cache->set($key, $value);
        }

        return null;
    }
640718
public function get($key)
    {
        if (!is_string($key)) {
            throw new \InvalidArgumentException('Expected string as key');
        }

        if (isset($this->data[$key])) {
            return $this->data[$key];
        } elseif (!$this->isDataLoadedFromDb) {
            $stmt = $this->db->prepare(
                'SELECT * FROM ' . $this->name . ' WHERE ' . $this->keyColumnName
                . ' = :key;'
            );
            $stmt->bindParam(':key', $key, \PDO::PARAM_STR);
            $stmt->execute();

            if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
                $this->data[$row[0]] = $row[1];
                return $this->data[$key];
            }
        }

        return null;
    }
261462
protected function get($key)
    {
        $this->checkForNonEmptyKey($key);
        if (!$this->settingsHaveBeenRetrieved) {
            $this->retrieveSettings();
        }
        if (!isset($this->cachedSettings[$key])) {
            return null;
        }

        return $this->cachedSettings[$key];
    }
299706
public function queryParameter($key)
    {
        $keys = array_pluck($this->queryParameters, 'key');
        $queryParameters = array_combine($keys, $this->queryParameters);
       
        return $queryParameters[$key];
    }
460279
private function getField($key)
    {
        return isset($this->data[$key]) ? $this->data[$key] : null;
    }