@param $data
@param null $key

@return string
352159
protected function http_build_multi_query($data, $key = null)
    {
        $query = [];

        if (empty($data)) {
            return $key.'=';
        }

        $is_array_assoc = $this->is_array_assoc($data);

        foreach ($data as $k => $value) {
            if (is_string($value) || is_numeric($value)) {
                $brackets = $is_array_assoc ? '['.$k.']' : '[]';
                $query[] = urlencode(null === $key ? $k : $key.$brackets).'='.rawurlencode($value);
            } else {
                if (is_array($value)) {
                    $nested = null === $key ? $k : $key.'['.$k.']';
                    $query[] = $this->http_build_multi_query($value, $nested);
                }
            }
        }

        return implode('&', $query);
    }
1336777
public static function getData($key = null) {
        if (!isset($key)) {
            return self::$viewContext->viewData;
        }
        else {
            return isset(self::$viewContext->viewData[$key]) ? self::$viewContext->viewData[$key] : null;
        }
    }
1041503
private function _getSecondaryKeys($data, $key = null)
    {
        if ($key) {
            $data = ArrayHelper::getValue($data, $key, []);
        }

        return ArrayHelper::getColumn($data, $this->relSecondaryKey);
    }
63045
public function save(array $data, $key = null)
    {
        if (is_null($key)) {
            $key = $this->defaultKey;
        }

        return $this->driver->save($data, $this->getKey($key));
    }
291800
public static function encode($data, String $key = NULL, String $separator = NULL) : String
    {
        if( ! is_scalar($data) )
        {
            $data = (array) $data;
        }
        
        $word      = NULL;
        $key       = $key       ?: self::$key;
        $separator = $separator ?: self::$separator;
 
        foreach( $data as $k => $v )
        {
            $word .= self::_security($k).$key.self::_security($v).$separator;
        }

        return mb_substr($word, 0, -(mb_strlen($separator)));
    }
1053100
public function getMetadata(string $key = null)
    {
        if ( ! is_resource($this->stream) ) {
            return is_null($key) ? [] : null;
        }

        if ( is_null($key) ) {
            return $this->customMetadata + stream_get_meta_data($this->stream);
        }

        if ( ! empty($this->customMetadata) ) {
            return $this->customMetadata;
        }

        $meta = stream_get_meta_data($this->stream);

        return ! is_null($key) && array_key_exists($key, $meta) ? $meta[$key] : null;
    }
422863
public function get($key)
    {
        if (empty($this->data[$key]) === true) {
            return null;
        }

        return $this->data[$key];
    }
582042
public function getRaw($key = null){
        if(null === $key){
            return $this->_data;
        }
        else{
            return isset($this->_data[$key])?$this->_data[$key]:null;
        }
    }
1294236
public static function getValue(string $key)
    {
        $key = \mb_strtolower($key);
        if(isset(self::$_data[$key])) {
            return self::$_data[$key];
        }
        return null;
    }
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;
    }
857648
private function getProperty(array $data, $key, $default = null)
    {
        return array_key_exists($key, $data) && $data[$key] !== null ? $data[$key] : $default;
    }
460279
private function getField($key)
    {
        return isset($this->data[$key]) ? $this->data[$key] : null;
    }
1351114
public function data(array $keys = null)
    {
        if ($keys === null) {
            $keys = $this->keys();
        }

        $data = [];
        foreach ($keys as $key) {
            if (strtolower($key) === 'data') {
                /** @internal Edge Case: Avoid recursive call */
                continue;
            }

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

		return $this->data;
	}
90459
public function getMetadata($key = null)
    {
        if (null === $key) {
            return stream_get_meta_data($this->resource);
        }

        $metadata = stream_get_meta_data($this->resource);
        if (! array_key_exists($key, $metadata)) {
            return;
        }

        return $metadata[$key];
    }
1328321
public static function decrypt($data, $key = null)
    {
        is_null($key) && $key = Config::get('auth_key');
        return unserialize(self::cry($data, 2, $key));
    }
1319605
public function getStoragePath(string $key = null): string
    {
        if (null === $key) {
            $path = $this->dataFolder;
        } else {
            $path = sprintf($this->dataPattern, $this->dataFolder, $key, substr($key, 0, 2));
        }

        return $path;
    }