Skip to content

Commit 7e2dcfc

Browse files
committed
Auto update url after setConfig()
1 parent 58fa9bb commit 7e2dcfc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/FcmV1.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@ public function setJsonFile($jsonFile)
7474
$this->config['jsonFile'] = $jsonFile;
7575
}
7676

77+
/**
78+
* Update the values by key on config array from the passed array. If any key doesn't exist, it's added.
79+
* @param array $config
80+
*/
81+
public function setConfig(array $config)
82+
{
83+
parent::setConfig($config);
84+
85+
// Update url
86+
$this->setProjectId($this->config['projectId']);
87+
}
88+
7789
/**
7890
* Set the needed headers for the push notification.
7991
*

0 commit comments

Comments
 (0)