-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f1317cf
commit 35c21c1
Showing
13 changed files
with
199 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
namespace BaptisteDulac\PushNotificationBundle\Message; | ||
|
||
use BaptisteDulac\PushNotificationBundle\MessageInterface; | ||
|
||
abstract class AbstractMessage implements MessageInterface | ||
{ | ||
|
||
private $id; | ||
|
||
private $title; | ||
|
||
private $message; | ||
|
||
private $devices = []; | ||
|
||
public function __construct(string $id, string $title, string $message) | ||
{ | ||
$this->id = $id; | ||
$this->title = $title; | ||
$this->message = $message; | ||
} | ||
|
||
public function addDevice(string $id) | ||
{ | ||
$this->devices[] = $id; | ||
} | ||
|
||
public function id(): string | ||
{ | ||
return $this->id; | ||
} | ||
|
||
public function title(): string | ||
{ | ||
return $this->title; | ||
} | ||
|
||
public function message(): string | ||
{ | ||
return $this->message; | ||
} | ||
|
||
public function devices(): array | ||
{ | ||
return $this->devices; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
services: | ||
BaptisteDulac\Sender\AndroidSender: | ||
BaptisteDulac\PushNotificationBundle\Sender\AndroidSender: | ||
arguments: | ||
- '%bd_push_notification.android.api_key%' | ||
- '%bd_push_notification.android.timeout%' | ||
- '%baptiste_dulac_push_notification.android.api_key%' | ||
- '%baptiste_dulac_push_notification.android.timeout%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
services: | ||
BaptisteDulac\Sender\IOSSender: | ||
BaptisteDulac\PushNotificationBundle\Sender\IOSSender: | ||
arguments: | ||
- '%bd_push_notification.ios.pem%' | ||
- '%bd_push_notification.ios.passphrase%' | ||
- '%bd_push_notification.ios.sandbox%' | ||
- '%bd_push_notification.ios.timeout%' | ||
- '%baptiste_dulac_push_notification.ios.pem%' | ||
- '%baptiste_dulac_push_notification.ios.passphrase%' | ||
- '%baptiste_dulac_push_notification.ios.sandbox%' | ||
- '%baptiste_dulac_push_notification.ios.timeout%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
services: | ||
BaptisteDulac\PushNotificationBundle\PushNotificationSender: | ||
public: false | ||
arguments: | ||
- '@BaptisteDulac\PushNotificationBundle\Sender\AndroidSender' | ||
- '@BaptisteDulac\PushNotificationBundle\Sender\IOSSender' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters