| 1 | <?php |
||
| 7 | class FeedbackService |
||
| 8 | { |
||
| 9 | use InteractsWithConnection; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * The feedback client instance. |
||
| 13 | * |
||
| 14 | * @var \ZendService\Apple\Apns\Client\Feedback |
||
| 15 | */ |
||
| 16 | protected $client; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Create feedback service instance. |
||
| 20 | * |
||
| 21 | * @param \ZendService\Apple\Apns\Client\Feedback $client |
||
| 22 | * @param \NotificationChannels\Apn\ApnCredentials $credentials |
||
| 23 | */ |
||
| 24 | public function __construct(Client $client, ApnCredentials $credentials) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Get feedback from the Apple Feedback Service about failed deliveries. |
||
| 32 | * |
||
| 33 | * @return array|ApnFeedback[] |
||
| 34 | * @throws Exceptions\ConnectionFailed |
||
| 35 | */ |
||
| 36 | public function get() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Fetch the feedback from APNS and collect our feedback object. |
||
| 49 | * |
||
| 50 | * @return array |
||
| 51 | */ |
||
| 52 | protected function fetchFeedback() |
||
| 63 | } |
||
| 64 |