Return a array of data containing information about a record
Used by Entity\Base->load()
@param string|array $key
@return array
13549
public function data( $key )
    {

        // string, key clause
        if( is_scalar( $key ) ) {

            $dataTypes = $this->dataTypesGet( DataType::PRIMARY_KEYS );
            try {
                $key = array_combine(
                    array_keys( $dataTypes ),
                    explode( Base::KEY_SEPARATOR, $key )
                );
            } catch ( \Exception $e ) {
                throw new BadKeyException(
                    sprintf(
                        "Passed key `%s` needs %d fragments; it has %d",
                        $key,
                        count( $dataTypes ),
                        count( explode( Base::KEY_SEPARATOR, $key ) )
                    )
                );
            }

        // is array
        } elseif( is_array( $key ) and count( $key ) > 0 ) {

            $dataTypes = $this->dataTypesGet( array_keys( $key ) );

        // bad argument
        } else {
            throw new \InvalidArgumentException("Can't lookup data for entity with this argument -> " . print_r( $key, true ) );
        }

        // we got the right amount of keyFragments?
        if( count($key) !== count($dataTypes) ) {
            throw new \InvalidArgumentException(
                sprintf(
                    "The passed key (%s) can't be married to the repository keys (%s). Epic fail.",
                    print_r($key, true),
                    implode(',', array_keys($dataTypes) )
                )
            );
        }

        // build where clause
        $where = array();
        foreach( $dataTypes as $name => $dataType ) {

            $where[] = sprintf(
                "%s = %s",
                $this->db->quoteIdent( $name ),
                $dataType->toQueryTag()
            );
            $data[$name] = $key[$name];

        }

        // build query
        $query = new Query(
            sprintf(
                "SELECT * FROM ONLY %s WHERE %s",
                $this->db->quoteIdent( $this->__get('table') ),
                implode( ' AND ', $where )
            ),
            $data
        );

        $result = $this->db->query( $query );
        $data = $result->fetch( Result::FETCH_SINGLE | Result::FLATTEN_PREVENT );

        return $data;

    }
453910
public function hGetAll($key) {
        return $this->send(['hgetall', $key], function ($response) {
            if ($response === null) {
                return null;
            }

            $size = \count($response);
            $result = [];

            for ($i = 0; $i < $size; $i += 2) {
                $result[$response[$i]] = $response[$i + 1];
            }

            return $result;
        });
    }
822397
public function getAsArray($key)
    {
        $rawValue = $this->get($key);
        if (!is_array($rawValue)) {
            $rawValue = [];
        }

        return $rawValue;
    }
725540
public function getAsArray($key)
    {
        if (! $this->has($key)) {
            return [];
        }
        $res = $this->attributes[$key];
        if (is_null($res)) {
            return [null];
        }

        return (array) $res;
    }
295436
public function getDataSource($key = 'database')
    {
        if ($this->container->exists('database')) {
            return $this->container->get($key);
        }

        return null;
    }
1003953
public function getData($key = null)
	{
		if ($key !== null) {
			return array_key_exists($key, $this->data) ? $this->data[$key] : null;
		}

		return $this->data;
	}
722031
public function fieldsByKey($key)
	{
		$keys = array();

		if ($this->rows && $this->count())
		{
			foreach ($this->rows as $row)
			{
				$keys[] = $row->$key;
			}
		}

		return $keys;
	}
1302005
public function hmget($key) {

        $set     = $this->getKey($collection, $key, []);
        $fields  = func_get_args();
        $values  = [];

        for ($i=1; $i<count($fields); $i++){
            $field = $fields[$i];
            $values[] = isset($set[$field]) ? $set[$field]:null;
        }

        return $values;
    }
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];
	}
789205
public function getParsedData($key = null)
    {
        $result = null;

        if ($this->parsedData !== null && is_array($this->parsedData)) {
            if (null === $key) {
                $result = $this->parsedData;
            } else {
                $result = (isset($this->parsedData[$key])) ? $this->parsedData[$key] : null;
            }
        }

        return $result;
    }
207397
function get($key)
    {
        if (!array_key_exists($key, $this->cache)) {
            return $this->read_record($key);
        }

        return $this->cache[$key];
    }
104525
public function getMessage($key = null) {
		$result = [];
		if (empty($key)) {
			return $result;
		}

		$sessionKey = $this->_sessionKey . '.' . $key;
		if (!CakeSession::check($sessionKey)) {
			return $result;
		}

		$data = CakeSession::read($sessionKey);
		if (empty($data)) {
			return $result;
		}

		$result = (array)$data;
		if (isAssoc($result)) {
			$result = [$result];
		}

		return $result;
	}
850702
public function getData($key = null)
    {
        if (!$key) {
            return $this->data;
        } else if ($this->hasKey($key)) {
            return $this->data[$key] ?? null;
        }

        return null;
    }
1094189
public function getData($key)
    {
        return empty($this->data[$key]) ? null : $this->data[$key];
    }
994280
protected function loadFromRegistry(string $key)
    {
        return array_key_exists($key, $this->registry) ? $this->registry[$key] : null;
    }
692182
public function getArray($key = null) {
        if (!is_null($key)) {
            return $this->getDeepValue($key);
        } else {
            return $this->_data;
        }
    }
939575
public function getData($key = null)
    {
        if (null === $key) {
            return $this->data;
        }
        
        $return = $this->data;
        foreach (explode('.', $key) as $subKey) {
            if (isset($return[$subKey])) {
                $return = $return[$subKey];
            } else {
                return null;
            }
        }
        return $return;
    }