immobiliare / ApnsPHP

ApnsPHP: Apple Push Notification & Feedback Provider
BSD 3-Clause "New" or "Revised" License
1.43k stars 449 forks source link

Custom Identifier Per Recipient #55

Closed ctsstc closed 10 years ago

ctsstc commented 10 years ago

Originally while looking at the push_many example I was worried that creating a new object each loop for a push that would have the same message would be very inefficient but then I found $message->addRecipient(token).

It seems though that now that the message has multiple recipients that you would need a custom identifier per recipient rather than per message, if for example you needed to get back to the token's identifier in the database.

Maybe there needs to be a recipient Class, or add a second parameter which takes a unique identifier.