Resumable upload implementation.

CloneableInstantiable
ExtendsGoogle\Cloud\Core\Upload\AbstractUploader
Constants
public Google\Cloud\Core\Upload\AbstractUploader::RESUMABLE_LIMIT = 5000000
public Google\Cloud\Core\Upload\AbstractUploader::UPLOAD_TYPE_MULTIPART = 'multipart'
public Google\Cloud\Core\Upload\AbstractUploader::UPLOAD_TYPE_RESUMABLE = 'resumable'
public Google\Cloud\Core\Upload\AbstractUploader::UPLOAD_TYPE_SIGNED = 'signed'
public Google\Cloud\Core\Upload\AbstractUploader::UPLOAD_TYPE_STREAMABLE = 'streamable'
Methods
public __construct(Google\Cloud\Core\RequestWrapper $requestWrapper, $data, $uri, array $options = [])
 


    public Google\Cloud\Core\Upload\AbstractUploader::buildUriWithQuery( $uri, array $query)
     


    • return UriInterface
    public Google\Cloud\Core\Upload\AbstractUploader::expandUri( $uri, array $variables)
     


    • return string
    • todo look at returning UriInterface
    public getResumeUri()
     
    Gets the resume URI.

    • return string
    public resume( $resumeUri)
     
    Resumes a download using the provided URI.

    • return array
    • throws GoogleException
    public upload()
     
    Triggers the upload process.

    Errors are of form google.rpc.Status,
    and may be obtained via {@see \Google\Cloud\Core\Exception\ServiceException::getMetadata()}.

    • return array
    • throws ServiceException
    Properties
    protected Google\Cloud\Core\Upload\AbstractUploader::$chunkSize
     


    • var int
    protected Google\Cloud\Core\Upload\AbstractUploader::$contentType
     


    • var string
    protected Google\Cloud\Core\Upload\AbstractUploader::$data
     


    • var StreamInterface
    protected $headers
     
    Classes extending ResumableUploader may provide request headers to be included in {@see Google\Cloud\Core\Upload\ResumableUploader::upload()} and {@see Google\Cloud\Core\Upload\ResumableUploader::createResumeUri{}}.

    • var array
    protected Google\Cloud\Core\Upload\AbstractUploader::$metadata
     


    • var array
    protected $rangeStart
     


    • var int
    protected Google\Cloud\Core\Upload\AbstractUploader::$requestOptions
     


    • var array
    protected Google\Cloud\Core\Upload\AbstractUploader::$requestWrapper
     


    • var RequestWrapper
    protected $resumeUri
     


    • var string
    protected Google\Cloud\Core\Upload\AbstractUploader::$uri
     


    • var string
    Methods
    protected createResumeUri()
     
    Creates the resume URI.

    • return string
    protected decodeResponse(Psr\Http\Message\ResponseInterface $response)
     
    Fetch and decode the response body

    • return array
    protected getRangeStart( $rangeHeader)
     
    Gets the starting range for the upload.

    • return int|null
    protected getStatusResponse()
     
    Gets the status of the upload.

    • return ResponseInterface
    Properties
    private $uploadProgressCallback
     


    • var callable
    Methods
    private static jsonDecode( $json, $assoc = false, $depth = 512, $options = 0)
     


    • return mixed
    • throws InvalidArgumentException
    private static jsonEncode( $value, $options = 0, $depth = 512)
     


    • return string
    • throws InvalidArgumentException
    Methods
    private static jsonDecode( $json, $assoc = false, $depth = 512, $options = 0)
     


    • return mixed
    • throws InvalidArgumentException
    private static jsonEncode( $value, $options = 0, $depth = 512)
     


    • return string
    • throws InvalidArgumentException
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only