/** * 生成DeleteMultiObjects接口的xml消息 * * @param string[] $objects * @param bool $quiet * @return string */ public static function createDeleteObjectsXmlBody($objects, $quiet) { $xml = new \SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><Delete></Delete>'); $xml->addChild('Quiet', $quiet); foreach ($objects as $object) { $sub_object = $xml->addChild('Object'); $object = OssUtil::sReplace($object); $sub_object->addChild('Key', $object); } return $xml->asXML(); }