File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
src/ObjectStore/v1/Models Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,27 @@ public function copy(array $options)
173
173
}
174
174
175
175
/**
176
- * {@inheritdoc}
176
+ * Update object system metadata and custom metadata.
177
+ *
178
+ * @param array $options {@see \OpenStack\ObjectStore\v1\Api::postObject}
179
+ *
180
+ */
181
+ public function update (array $ options )
182
+ {
183
+ $ options += ['name ' => $ this ->name , 'containerName ' => $ this ->containerName ];
184
+ if (isset ($ options ['metadata ' ]) && is_array ($ options ['metadata ' ]))
185
+ {
186
+ $ options ['metadata ' ] = array_merge ($ options ['metadata ' ], $ this ->getMetadata ());
187
+ }
188
+
189
+ $ response = $ this ->execute ($ this ->api ->postObject (), $ options );
190
+ $ this ->metadata = $ this ->parseMetadata ($ response );
191
+ }
192
+
193
+ /**
194
+ * Update object only custom metadata.
195
+ *
196
+ * @param array $metadata
177
197
*/
178
198
public function mergeMetadata (array $ metadata )
179
199
{
You can’t perform that action at this time.
0 commit comments