@@ 69-84 (lines=16) @@ | ||
66 | /** |
|
67 | * {@inheritdoc} |
|
68 | */ |
|
69 | public function resetMetadata(array $metadata) |
|
70 | { |
|
71 | $options = [ |
|
72 | 'removeMetadata' => [], |
|
73 | 'metadata' => $metadata, |
|
74 | ]; |
|
75 | ||
76 | foreach ($this->getMetadata() as $key => $val) { |
|
77 | if (!array_key_exists($key, $metadata)) { |
|
78 | $options['removeMetadata'][$key] = 'True'; |
|
79 | } |
|
80 | } |
|
81 | ||
82 | $response = $this->execute($this->api->postAccount(), $options); |
|
83 | return $this->parseMetadata($response); |
|
84 | } |
|
85 | ||
86 | /** |
|
87 | * {@inheritdoc} |
@@ 107-123 (lines=17) @@ | ||
104 | /** |
|
105 | * {@inheritdoc} |
|
106 | */ |
|
107 | public function resetMetadata(array $metadata) |
|
108 | { |
|
109 | $options = [ |
|
110 | 'name' => $this->name, |
|
111 | 'removeMetadata' => [], |
|
112 | 'metadata' => $metadata, |
|
113 | ]; |
|
114 | ||
115 | foreach ($this->getMetadata() as $key => $val) { |
|
116 | if (!array_key_exists($key, $metadata)) { |
|
117 | $options['removeMetadata'][$key] = 'True'; |
|
118 | } |
|
119 | } |
|
120 | ||
121 | $response = $this->execute($this->api->postContainer(), $options); |
|
122 | return $this->parseMetadata($response); |
|
123 | } |
|
124 | ||
125 | /** |
|
126 | * {@inheritdoc} |