src/Files.php
static function getStorageObject($filename) {
        $scheme = parse_url($filename, PHP_URL_SCHEME);
        $bucket = parse_url($filename, PHP_URL_HOST);
        $path = parse_url($filename, PHP_URL_PATH);
        $object_name = trim($path, "/");
        if ($scheme == "gs") {
            $client = self::getStorageClient();
            $bucket = $client->bucket($bucket);
            $object = $bucket->object($object_name);
            return $object;
        } else {
            syslog(LOG_WARNING, "Trying to get storage object on invalid url: $filename");
            return false;
        }
    }
static function getStorageObject($filename) {
        $scheme = parse_url($filename, PHP_URL_SCHEME);
        $bucket = parse_url($filename, PHP_URL_HOST);
        $path = parse_url($filename, PHP_URL_PATH);
        $object_name = trim($path, "/");
        if ($scheme == "gs") {
            $client = self::getStorageClient();
            $bucket = $client->bucket($bucket);
            $object = $bucket->object($object_name);
            return $object;
        } else {
            syslog(LOG_WARNING, "Trying to get storage object on invalid url: $filename");
            return false;
        }
    }
static function getStorageObject ( $ filename ) { $ scheme = parse_url ( $ filename , PHP_URL_SCHEME ) ; $ bucket = parse_url ( $ filename , PHP_URL_HOST ) ; $ path = parse_url ( $ filename , PHP_URL_PATH ) ; $ object_name = trim ( $ path , "/" ) ; if ( $ scheme == "gs" ) { $ client = self :: getStorageClient ( ) ; $ bucket = $ client -> bucket ( $ bucket ) ; $ object = $ bucket -> object ( $ object_name ) ; return $ object ; } else { syslog ( LOG_WARNING , "Trying to get storage object on invalid url: $filename" ) ; return false ; } }
Objects are the individual pieces of data that you store in Google Cloud Storage.
This function let you fetch object from Cloud Storage from the devserver.

@param $filename
@return bool|\Google\Cloud\Storage\StorageObject
Objects are the individual pieces of data that you store in Google Cloud Storage . This function let you fetch object from Cloud Storage from the devserver .