protected function parseMetadata($path, array $headers)
    {
        $metadata = [
            'path' => $path,
            'visibility' => $this->visibility,
            'mimetype' => $this->parseMimeType($path, $headers),
        ];

        if (false !== $timestamp = $this->parseTimestamp($headers)) {
            $metadata['timestamp'] = $timestamp;
        }

        if (isset($headers['content-length']) && is_numeric($headers['content-length'])) {
            $metadata['size'] = (int) $headers['content-length'];
        }

        return $metadata;
    }
protected function parseMetadata($path, array $headers)
    {
        $metadata = [
            'path' => $path,
            'visibility' => $this->visibility,
            'mimetype' => $this->parseMimeType($path, $headers),
        ];

        if (false !== $timestamp = $this->parseTimestamp($headers)) {
            $metadata['timestamp'] = $timestamp;
        }

        if (isset($headers['content-length']) && is_numeric($headers['content-length'])) {
            $metadata['size'] = (int) $headers['content-length'];
        }

        return $metadata;
    }
protected function parseMetadata ( $ path , array $ headers ) { $ metadata = [ 'path' => $ path , 'visibility' => $ this -> visibility , 'mimetype' => $ this -> parseMimeType ( $ path , $ headers ) , ] ; if ( false !== $ timestamp = $ this -> parseTimestamp ( $ headers ) ) { $ metadata [ 'timestamp' ] = $ timestamp ; } if ( isset ( $ headers [ 'content-length' ] ) && is_numeric ( $ headers [ 'content-length' ] ) ) { $ metadata [ 'size' ] = ( int ) $ headers [ 'content-length' ] ; } return $ metadata ; }
Parses metadata out of response headers.

@param string $path
@param array  $headers

@return array
Parses metadata out of response headers .