/** * Store a key/value array of metadata at the given path. * WARNING: This operation overwrites any metadata that is located at * $destinationPath. * * @param string $destinationPath * @param array $metadata associative array specifying the key/value pairs for the metadata. * @param array $options * @return void */ public function storeMetadata($destinationPath, $metadata, $options = null) { $this->_rackspace->setMetadataObject($this->_container, $destinationPath, $metadata); if (!$this->_rackspace->isSuccessful()) { throw new Zend_Cloud_StorageService_Exception('Error on store metadata: ' . $this->_rackspace->getErrorMsg()); } }
public function testSetMetadataObject() { $result = $this->rackspace->setMetadataObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME, TESTS_ZEND_SERVICE_RACKSPACE_OBJECT_NAME, $this->metadata2); $this->assertTrue($result); }
/** * Set the metadata value * The old metadata values are replaced with the new one * * @param array $metadata * @return boolean */ public function setMetadata($metadata) { return $this->service->setMetadataObject($this->container, $this->name, $metadata); }
public function testSetMetadataObject() { $result = $this->rackspace->setMetadataObject('zf-unit-test', 'zf-object-test', $this->metadata2); $this->assertTrue($result); }