src/Multipart/AbstractUploadManager.php
private function determineState()
    {
        // If the state was provided via config, then just use it.
        if ($this->config['state'] instanceof UploadState) {
            return $this->config['state'];
        }

        // Otherwise, construct a new state from the provided identifiers.
        $required = $this->info['id'];
        $id = [$required['upload_id'] => null];
        unset($required['upload_id']);
        foreach ($required as $key => $param) {
            if (!$this->config[$key]) {
                throw new IAE('You must provide a value for "' . $key . '" in '
                    . 'your config for the MultipartUploader for '
                    . $this->client->getApi()->getServiceFullName() . '.');
            }
            $id[$param] = $this->config[$key];
        }
        $state = new UploadState($id);
        $state->setPartSize($this->determinePartSize());

        return $state;
    }
private function determineState()
    {
        // If the state was provided via config, then just use it.
        if ($this->config['state'] instanceof UploadState) {
            return $this->config['state'];
        }

        // Otherwise, construct a new state from the provided identifiers.
        $required = $this->info['id'];
        $id = [$required['upload_id'] => null];
        unset($required['upload_id']);
        foreach ($required as $key => $param) {
            if (!$this->config[$key]) {
                throw new IAE('You must provide a value for "' . $key . '" in '
                    . 'your config for the MultipartUploader for '
                    . $this->client->getApi()->getServiceFullName() . '.');
            }
            $id[$param] = $this->config[$key];
        }
        $state = new UploadState($id);
        $state->setPartSize($this->determinePartSize());

        return $state;
    }
private function determineState ( ) { // If the state was provided via config, then just use it. if ( $ this -> config [ 'state' ] instanceof UploadState ) { return $ this -> config [ 'state' ] ; } // Otherwise, construct a new state from the provided identifiers. $ required = $ this -> info [ 'id' ] ; $ id = [ $ required [ 'upload_id' ] => null ] ; unset ( $ required [ 'upload_id' ] ) ; foreach ( $ required as $ key => $ param ) { if ( ! $ this -> config [ $ key ] ) { throw new IAE ( 'You must provide a value for "' . $ key . '" in ' . 'your config for the MultipartUploader for ' . $ this -> client -> getApi ( ) -> getServiceFullName ( ) . '.' ) ; } $ id [ $ param ] = $ this -> config [ $ key ] ; } $ state = new UploadState ( $ id ) ; $ state -> setPartSize ( $ this -> determinePartSize ( ) ) ; return $ state ; }
Based on the config and service-specific workflow info, creates a
`Promise` for an `UploadState` object.

@return PromiseInterface A `Promise` that resolves to an `UploadState`.
Based on the config and service - specific workflow info creates a Promise for an UploadState object .