1 | <?php |
||
8 | class FeedbackService |
||
9 | { |
||
10 | /** |
||
11 | * The feedback client instance. |
||
12 | * |
||
13 | * @var \ZendService\Apple\Apns\Client\Feedback |
||
14 | */ |
||
15 | protected $client; |
||
16 | |||
17 | /** |
||
18 | * Create feedback service instance. |
||
19 | * |
||
20 | * @param \ZendService\Apple\Apns\Client\Feedback $client |
||
21 | * @param string $environment |
||
22 | * @param string $certificate |
||
23 | * @param string|null $passPhrase |
||
24 | * @return void |
||
|
|||
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 | * Open the connection to the feedback service. |
||
53 | * |
||
54 | * @return void |
||
55 | * @throws \NotificationChannels\Apn\Exception\ConnectionFailed |
||
56 | */ |
||
57 | 1 | protected function openConnection() |
|
65 | |||
66 | /** |
||
67 | * Fetch the feedback from APNS and collect our feedback object. |
||
68 | * |
||
69 | * @return array |
||
70 | */ |
||
71 | 1 | protected function fetchFeedback() |
|
82 | } |
||
83 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.