Skip to content
Snippets Groups Projects
Commit 3ecf446c authored by Zandor Smith's avatar Zandor Smith :computer:
Browse files

Rename authKeyUrl to authKeyPath and deprecate the old getter.

parent 4421da02
No related branches found
No related tags found
No related merge requests found
Pipeline #15349 passed
......@@ -30,10 +30,10 @@ class APNS {
*/
private $authKeyId;
public function __construct($teamId, $bundleId, $authKeyUrl, $authKeyId) {
public function __construct($teamId, $bundleId, $authKeyPath, $authKeyId) {
$this->teamId = $teamId;
$this->bundleId = $bundleId;
$this->authKeyUrl = $authKeyUrl;
$this->authKeyPath = $authKeyPath;
$this->authKeyId = $authKeyId;
}
......@@ -53,11 +53,19 @@ class APNS {
/**
* @return string
* @deprecated Use getAuthKeyPath() instead.
*/
public function getAuthKeyUrl(): string {
return $this->authKeyUrl;
return $this->getAuthKeyPath();
}
/**
* @return string
*/
public function getAuthKeyPath(): string {
return $this->authKeyPath;
}
/**
* @return string
*/
......@@ -72,7 +80,7 @@ class APNS {
* @throws APNSException
*/
public function sendNotification(APNSNotification $notification, APNSToken $token): void {
$authKey = file_get_contents($this->authKeyUrl);
$authKey = file_get_contents($this->authKeyPath);
if($authKey == false) {
throw new APNSException("Can't read auth key. Failed to read file.");
}
......@@ -105,5 +113,4 @@ class APNS {
curl_close($ch);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment