src/BaiduBce/Services/Vod/VodClient.php
public function updateMedia($mediaId, $title, $description, $options = array())
    {
        list($config) = $this->parseOptions($options, 'config');

        if (empty($mediaId)) {
            throw new BceClientException("The parameter mediaId should NOT be null or empty string");
        }

        if (empty($title)) {
            throw new BceClientException("The parameter title should NOT be null or empty string");
        }

        $body = array(
            'title' => $title,
            'description' => $description,
        );

        $params = array(
            'attributes' => null,
        );

        return $this->sendRequest(
            HttpMethod::PUT,
            array(
                'config' => $config,
                'body' => json_encode($body),
                'params' => $params,
            ),
            "/media/$mediaId"
        );
    }
public function updateMedia($mediaId, $title, $description, $options = array())
    {
        list($config) = $this->parseOptions($options, 'config');

        if (empty($mediaId)) {
            throw new BceClientException("The parameter mediaId should NOT be null or empty string");
        }

        if (empty($title)) {
            throw new BceClientException("The parameter title should NOT be null or empty string");
        }

        $body = array(
            'title' => $title,
            'description' => $description,
        );

        $params = array(
            'attributes' => null,
        );

        return $this->sendRequest(
            HttpMethod::PUT,
            array(
                'config' => $config,
                'body' => json_encode($body),
                'params' => $params,
            ),
            "/media/$mediaId"
        );
    }
public function updateMedia ( $ mediaId , $ title , $ description , $ options = array ( ) ) { list ( $ config ) = $ this -> parseOptions ( $ options , 'config' ) ; if ( empty ( $ mediaId ) ) { throw new BceClientException ( "The parameter mediaId should NOT be null or empty string" ) ; } if ( empty ( $ title ) ) { throw new BceClientException ( "The parameter title should NOT be null or empty string" ) ; } $ body = array ( 'title' => $ title , 'description' => $ description , ) ; $ params = array ( 'attributes' => null , ) ; return $ this -> sendRequest ( HttpMethod :: PUT , array ( 'config' => $ config , 'body' => json_encode ( $ body ) , 'params' => $ params , ) , "/media/$mediaId" ) ; }
update the attributes of a vod media

@param $mediaId string, mediaId of the media
@param $title string, new title of the media
@param $description string, new description of the media
@param array $options Supported options:
{
config: the optional bce configuration, which will overwrite the
default vod client configuration that was passed in constructor.
}
@return mixed the result of updating
@throws BceClientException
update the attributes of a vod media