| 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 int $environment |
||
| 23 | * @param string $certificate |
||
| 24 | * @param string|null $passPhrase |
||
| 25 | */ |
||
| 26 | 1 | public function __construct(Client $client, $environment, $certificate, $passPhrase = null) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * Get feedback from the Apple Feedback Service about failed deliveries. |
||
| 36 | * |
||
| 37 | * @return array|ApnFeedback[] |
||
| 38 | * @throws Exceptions\ConnectionFailed |
||
| 39 | */ |
||
| 40 | 1 | public function get() |
|
| 50 | |||
| 51 | /** |
||
| 52 | * Fetch the feedback from APNS and collect our feedback object. |
||
| 53 | * |
||
| 54 | * @return array |
||
| 55 | */ |
||
| 56 | 1 | protected function fetchFeedback() |
|
| 67 | } |
||
| 68 |