Storage/src/SigningHelper.php
private function normalizeResource($resource)
    {
        $pieces = explode('/', trim($resource, '/'));
        array_walk($pieces, function (&$piece) {
            $piece = rawurlencode($piece);
        });
        return '/' . implode('/', $pieces);
    }
private function normalizeResource($resource)
    {
        $pieces = explode('/', trim($resource, '/'));
        array_walk($pieces, function (&$piece) {
            $piece = rawurlencode($piece);
        });
        return '/' . implode('/', $pieces);
    }
private function normalizeResource ( $ resource ) { $ pieces = explode ( '/' , trim ( $ resource , '/' ) ) ; array_walk ( $ pieces , function ( & $ piece ) { $ piece = rawurlencode ( $ piece ) ; } ) ; return '/' . implode ( '/' , $ pieces ) ; }
Normalizes and encodes the resource identifier.

@param string $resource The resource identifier. In form
`[/]$bucket/$object`.
@return string The resource, with pieces encoded and prefixed with a
forward slash.
Normalizes and encodes the resource identifier .