public function deleteObjects($bucket, $objects, $options = null)
    {
        $this->precheckCommon($bucket, NULL, $options, false);
        if (!is_array($objects) || !$objects) {
            throw new OssException('objects must be array');
        }
        $options[self::OSS_METHOD] = self::OSS_HTTP_POST;
        $options[self::OSS_BUCKET] = $bucket;
        $options[self::OSS_OBJECT] = '/';
        $options[self::OSS_SUB_RESOURCE] = 'delete';
        $options[self::OSS_CONTENT_TYPE] = 'application/xml';
        $quiet = 'false';
        if (isset($options['quiet'])) {
            if (is_bool($options['quiet'])) { //Boolean
                $quiet = $options['quiet'] ? 'true' : 'false';
            } elseif (is_string($options['quiet'])) { // string
                $quiet = ($options['quiet'] === 'true') ? 'true' : 'false';
            }
        }
        $xmlBody = OssUtil::createDeleteObjectsXmlBody($objects, $quiet);
        $options[self::OSS_CONTENT] = $xmlBody;
        $response = $this->auth($options);
        $result = new DeleteObjectsResult($response);
        return $result->getData();
    }
public function deleteObjects($bucket, $objects, $options = null)
    {
        $this->precheckCommon($bucket, NULL, $options, false);
        if (!is_array($objects) || !$objects) {
            throw new OssException('objects must be array');
        }
        $options[self::OSS_METHOD] = self::OSS_HTTP_POST;
        $options[self::OSS_BUCKET] = $bucket;
        $options[self::OSS_OBJECT] = '/';
        $options[self::OSS_SUB_RESOURCE] = 'delete';
        $options[self::OSS_CONTENT_TYPE] = 'application/xml';
        $quiet = 'false';
        if (isset($options['quiet'])) {
            if (is_bool($options['quiet'])) { //Boolean
                $quiet = $options['quiet'] ? 'true' : 'false';
            } elseif (is_string($options['quiet'])) { // string
                $quiet = ($options['quiet'] === 'true') ? 'true' : 'false';
            }
        }
        $xmlBody = OssUtil::createDeleteObjectsXmlBody($objects, $quiet);
        $options[self::OSS_CONTENT] = $xmlBody;
        $response = $this->auth($options);
        $result = new DeleteObjectsResult($response);
        return $result->getData();
    }
public function deleteObjects ( $ bucket , $ objects , $ options = null ) { $ this -> precheckCommon ( $ bucket , NULL , $ options , false ) ; if ( ! is_array ( $ objects ) || ! $ objects ) { throw new OssException ( 'objects must be array' ) ; } $ options [ self :: OSS_METHOD ] = self :: OSS_HTTP_POST ; $ options [ self :: OSS_BUCKET ] = $ bucket ; $ options [ self :: OSS_OBJECT ] = '/' ; $ options [ self :: OSS_SUB_RESOURCE ] = 'delete' ; $ options [ self :: OSS_CONTENT_TYPE ] = 'application/xml' ; $ quiet = 'false' ; if ( isset ( $ options [ 'quiet' ] ) ) { if ( is_bool ( $ options [ 'quiet' ] ) ) { //Boolean $ quiet = $ options [ 'quiet' ] ? 'true' : 'false' ; } elseif ( is_string ( $ options [ 'quiet' ] ) ) { // string $ quiet = ( $ options [ 'quiet' ] === 'true' ) ? 'true' : 'false' ; } } $ xmlBody = OssUtil :: createDeleteObjectsXmlBody ( $ objects , $ quiet ) ; $ options [ self :: OSS_CONTENT ] = $ xmlBody ; $ response = $ this -> auth ( $ options ) ; $ result = new DeleteObjectsResult ( $ response ) ; return $ result -> getData ( ) ; }
Deletes multiple objects in a bucket

@param string $bucket bucket name
@param array $objects object list
@param array $options
@return ResponseCore
@throws null
Deletes multiple objects in a bucket