@param string $key
@param array  $data

@return array|bool
438856
public function data(string $key, array $data = null)
    {
        $this->tryLoad($key);

        if (!\array_key_exists($key, $this->data))
        {
            $this->data[$key] = $this->get($key, $data);
        }

        return $this->data[$key];
    }
63045
public function save(array $data, $key = null)
    {
        if (is_null($key)) {
            $key = $this->defaultKey;
        }

        return $this->driver->save($data, $this->getKey($key));
    }
983290
public function decrypt($data, Key $key)
	{
		// Validate key.
		if ($key->type != 'simple')
		{
			throw new \InvalidArgumentException('Invalid key of type: ' . $key->type . '.  Expected simple.');
		}

		$decrypted = '';
		$tmp = $key->public;

		// Convert the HEX input into an array of integers and get the number of characters.
		$chars = $this->_hexToIntArray($data);
		$charCount = count($chars);

		// Repeat the key as many times as necessary to ensure that the key is at least as long as the input.
		for ($i = 0; $i < $charCount; $i = strlen($tmp))
		{
			$tmp = $tmp . $tmp;
		}

		// Get the XOR values between the ASCII values of the input and key characters for all input offsets.
		for ($i = 0; $i < $charCount; $i++)
		{
			$decrypted .= chr($chars[$i] ^ ord($tmp[$i]));
		}

		return $decrypted;
	}
132835
private function createManyToOneRelation(array &$data, $key)
    {
        $uid = isset($data[$key]) ? (int)$data[$key] : 0;

        $data[$key] = ($uid > 0)
            ? \Tx_Oelib_MapperRegistry::get($this->relations[$key])->find($uid)
            : null;
    }
520481
protected function parseData( array $data, $arrayKey = null )
	{
		if ( is_null( $arrayKey ) )
		{
			$this->files = [];
		}

		foreach ( $data as $key => $value )
		{
			$key = ( $arrayKey ) ? "$arrayKey.$key" : $key;

			// If this value is an instance of the HttpFoundation File class we will
			// remove it from the data array and add it to the files array, which
			// we use to conveniently separate out these files from other data.
			if ( $value instanceof File )
			{
				$this->files[$key] = $value;

				unset( $data[$key] );
			}
			elseif ( is_array( $value ) )
			{
				$this->parseData( $value, $key );
			}
		}

		return $data;
	}
817714
public function set($key, $data = null)
    {
        if (is_array($key)) {
            $this->appendArray($key);
        } else {
            $this->appendData($key, $data);
        }

        return $this;
    }
154559
static function createFromData($key, array $data)
    {
        return new self(
            $key,
            isset($data[self::TYPE_CALL]) ? $data[self::TYPE_CALL] : null,
            isset($data[self::TYPE_TIME]) ? $data[self::TYPE_TIME] : null,
            isset($data[self::TYPE_CPU]) ? $data[self::TYPE_CPU] : null,
            isset($data[self::TYPE_MEMORY_USAGE]) ? $data[self::TYPE_MEMORY_USAGE] : null,
            isset($data[self::TYPE_PEAK_MEMORY_USAGE]) ? $data[self::TYPE_PEAK_MEMORY_USAGE] : null
        );
    }
478317
public static function getValueByKey($data, $key = null, $default = null)
    {
        if (!isset($key) || empty($key)) {
            return $data;
        }

        if (is_array($key)) {
            $keys = $key;
        } else {
            $keys = explode('.', $key);
        }

        $item = $data;
        foreach ($keys as $keyName) {
            if (is_array($item)) {
                if (isset($item[$keyName])) {
                    $item = $item[$keyName];
                } else {
                    return $default;
                }
            } else if (is_object($item)) {
                if (isset($item->$keyName)) {
                    $item = $item->$keyName;
                } else {
                    return $default;
                }
            }

        }

        return $item;
    }
857648
private function getProperty(array $data, $key, $default = null)
    {
        return array_key_exists($key, $data) && $data[$key] !== null ? $data[$key] : $default;
    }
440018
public static function array_delete(array &$data, $key){
		if(array_key_exists($key, $data)){
			$value = $data[$key];
			unset($data[$key]);
			return $value;
		}
	}
789290
public static function getDecoded($data, $key)
    {
        if (!Any::isArray($data)) {
            $data = self::decode($data);
        }

        return $data === false ? null : $data[$key];
    }
490596
private static function recursiveGetFromKey($data, $key, $default)
    {
        if (empty($key)) {
            return $data;
        } else {
            $currentKey = array_shift($key);
            return isset($data[$currentKey]) ? self::recursiveGetFromKey($data[$currentKey], $key, $default) : $default;
        }
    }
784498
public function flattenArrayByKey(array $data, $key)
    {
        $array = [];
        foreach ($data as $value) {
            if (is_array($value) && isset($value[$key])) {
                $array[] = $value[$key];
            }
        }

        return $array;
    }
861960
protected function arrayHasKey(&$source, $key)
    {
        if (!$key || !is_array($source)) {
            return false;
        }

        if (array_key_exists($key, $source)) {
            return true;
        }

        $current =& $source;
        foreach (explode('.', $key) as $segment) {
            if (!array_key_exists($segment, $current)) {
                return false;
            }
            $current =& $current[$segment];
        }

        return true;
    }
294470
public function hmSet($key, array $data) {
        $array = ['hmset', $key];

        foreach ($data as $dataKey => $value) {
            $array[] = $dataKey;
            $array[] = $value;
        }

        return $this->send($array);
    }
332682
public function offsetGet($key)
    {

        if(is_array($this->data) && isset($this->data[$key])){
	        return $this->recursive ? new self($this->data[$key], true) : $this->data[$key];
        }

        return false;
    }
110593
public static function keysExist(array $data, array $keys): bool
    {
        if (count($keys) > 0) {
            foreach ($keys as $key) {
                if (!array_key_exists($key, $data)) {
                    return false;
                }
            }
        }
        return true;
    }