File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
src/ObjectStore/v1/Models Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,24 @@ public function copy(array $options)
173173 }
174174
175175 /**
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+ $ options ['metadata ' ] = array_merge ($ options ['metadata ' ] ?? [] , $ this ->getMetadata ());
185+
186+ $ response = $ this ->execute ($ this ->api ->postObject (), $ options );
187+ $ this ->metadata = $ this ->parseMetadata ($ response );
188+ }
189+
190+ /**
191+ * Update object only custom metadata.
192+ *
193+ * @param array $metadata
177194 */
178195 public function mergeMetadata (array $ metadata )
179196 {
You can’t perform that action at this time.
0 commit comments