Skip to content

Commit 2be473b

Browse files
authored
Merge pull request #141 from renderforest/sound
removeSounds
2 parents 814c7bc + c78f720 commit 2be473b

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "renderforest/sdk-php",
33
"description": "Renderforest SDK for PHP",
4-
"version": "0.5.0",
4+
"version": "0.5.1",
55
"homepage": "https://github.com/renderforest/renderforest-sdk-php",
66
"keywords": [
77
"animation maker",

examples/project-data/project-manipulation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848

4949
$projectData
5050
->getSounds()
51+
->removeSounds()
5152
->add($sound);
5253

5354
$renderforestClient->updateProjectData($duplicatedProject, $projectData);

src/Sound/Collection/SoundCollection.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ public function add(AbstractSound $sound): SoundCollection
4747
return $this;
4848
}
4949

50+
/**
51+
* @return SoundCollection
52+
*/
53+
public function removeSounds(): SoundCollection
54+
{
55+
$this->sounds = [];
56+
57+
return $this;
58+
}
59+
5060
/**
5161
* @param string $soundCollectionJson
5262
* @throws \Exception

0 commit comments

Comments
 (0)