src/ManagementResources/ResourceBase.php
function put($id, $payload)
    {
        $this->requestDecorator->setId($id);
        $this->requestDecorator->setPayload($payload);
        if ((is_array($payload)) && (!empty($payload['sys']['version']))) {
            $this->requestDecorator->addHeader('X-Contentful-Version', $payload['sys']['version']);
        }
        $result = $this->client->put($this->requestDecorator->makeResource(), $this->requestDecorator->makePayload(), $this->requestDecorator->makeHeaders());
        $this->refresh();
        return $result;
    }
function put($id, $payload)
    {
        $this->requestDecorator->setId($id);
        $this->requestDecorator->setPayload($payload);
        if ((is_array($payload)) && (!empty($payload['sys']['version']))) {
            $this->requestDecorator->addHeader('X-Contentful-Version', $payload['sys']['version']);
        }
        $result = $this->client->put($this->requestDecorator->makeResource(), $this->requestDecorator->makePayload(), $this->requestDecorator->makeHeaders());
        $this->refresh();
        return $result;
    }
function put ( $ id , $ payload ) { $ this -> requestDecorator -> setId ( $ id ) ; $ this -> requestDecorator -> setPayload ( $ payload ) ; if ( ( is_array ( $ payload ) ) && ( ! empty ( $ payload [ 'sys' ] [ 'version' ] ) ) ) { $ this -> requestDecorator -> addHeader ( 'X-Contentful-Version' , $ payload [ 'sys' ] [ 'version' ] ) ; } $ result = $ this -> client -> put ( $ this -> requestDecorator -> makeResource ( ) , $ this -> requestDecorator -> makePayload ( ) , $ this -> requestDecorator -> makeHeaders ( ) ) ; $ this -> refresh ( ) ; return $ result ; }
Make a put request.
@param $id
@param $payload
@return mixed
Make a put request .